Hello.
This small vbs script is working fine for me:
Dim Answer
Answer = inputbox ("Fillin 'q' for Quit")if Answer = "q" then
msgbox "Quit"
Wscript.Quit
end if
msgbox "Execute Code"
Hello.
This small vbs script is working fine for me:
Dim Answer
Answer = inputbox ("Fillin 'q' for Quit")if Answer = "q" then
msgbox "Quit"
Wscript.Quit
end if
msgbox "Execute Code"
Thanks Holger,
got the script to work.
To add a point here: when I tried to execute from my desktop, the error message prompts for "Object Required 'WScript-'", yet when I ran it in a folder with a button embedded to execute the script, it worked.
Looks like the script recording and playback option does not work, yet an embedded button from GuiXT does.
HelloStefan,
The_Excel_BookList() function does not findan openinstance oftheSAPGUI.
Ifoundan Excelprocessin the task manager, but_Excel_BookList() functionfound nothing.
Like Ialreadysaid before...
...I found an article that explains exactly where I'm stuck!
http://help.sap.com/saphelp_afs64/helpdata/ja/b7/989d37d373243de10000009b38f8cf/content.htm
Muito obrigado!
Márcio.
HelloHolgerKohn,
I believe to beable to convertthe code toAutoIt. If Ican not access theinstance of Excelwill try tosaveCSVfile.
Thank you so much.
Márcio.
Dear Community,
I'm new to this forum and also new as VBA developer. Currently I'm working on the automation project in which i need to enter specific details on SAP (730) and generate report which look like excel-sheet but its not. When I select export to excel workbook the SAP save as window pops-up and I'm unable to access that window through macro and I was stuck there. Then I have identified many similar cases in this forum and provided solutions for it.
I tried to use below solution by calling separate vb script to control Save As window through my VBA code, but I'm stuck when there is any space in the file path where I need to save these files. I'm not much aware of SAP and vb script. Do I need to change any specific code below ?
Any help is much appreciated..thanks in advance.
My Code is as below:
session.findById("wnd[0]").sendVKey 8 'after this line the SaveAs window pop-up
FilePath = "c:\tmp\Sap download file\test1.xlsx") 'here is some space in file path
set Wshell = CreateObject("WScript.Shell")
wshell.run """c:\tmp\save_as.vbs """ & FilePath
session.findById("wnd[0]/tbar[1]/btn[16]").press
Save_as.vbs includes:
if Wscript.Arguments.count > 0 then
set fs = CreateObject("Scripting.FileSystemObject")
if fs.fileExists(WScript.arguments(0)) then
Set myfile = fs.GetFile(WScript.arguments(0))
myfile.Delete
end if
set Wshell = CreateObject("WScript.Shell")
Do
bWindowFound = Wshell.AppActivate("Save As")
WScript.Sleep 1000
Loop Until bWindowFound
Do
Wshell.appActivate "Save As"
Wshell.sendkeys WScript.arguments(0)
WScript.Sleep 400
Wshell.appActivate "Save As"
Wshell.sendkeys "%s"
WScript.Sleep 400
bWindowFound = Wshell.AppActivate("Save As")
WScript.Sleep 400
Loop Until not bWindowFound
end if
HI I would like to solve a task i do every day many many times. When i allocate payments i nearly all time have to send a mail in lotus notes. I would like to be able to transfer the input in specific fields to lotus mail. If not possible to a excel sheet.
If directly to lotus mail the FULL Name in the second picture have to go to the mail address in top
And the rest from the first picture have to go in the subject line with space between. So the Custemer is first and then name and then the amount which are highlighted in the payment which are open.
If in excel sheet.
I would like it open a new workbook,
Paste the Full name in the second picture/session to A1.
Paste Customer name to A2 from the first picture
Paste name to A3 from the first picture
and Highlighted amount to cell A4 from the first picture-
Please let me know if i have to find some controls and where to find and record them.
Thanks in advance
Sincerely
Abjac
Hi again guys/ ScriptMan,
I have a SAP recording which is repetitive as follows:
session.findById("wnd[0]/tbar[0]/okcd").text = "mmrv"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtMARV-BUKRS").text = "A111"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/chkMARV-XRUEM").selected = false
session.findById("wnd[0]/usr/chkMARV-XRUEM").setFocus
session.findById("wnd[0]/tbar[0]/btn[11]").press
session.findById("wnd[0]/usr/ctxtMARV-BUKRS").text = "B111"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/chkMARV-XRUEM").selected = false
session.findById("wnd[0]/usr/chkMARV-XRUEM").setFocus
session.findById("wnd[0]/tbar[0]/btn[11]").press
session.findById("wnd[0]/usr/ctxtMARV-BUKRS").text = "C111"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/chkMARV-XRUEM").selected = false
session.findById("wnd[0]/usr/chkMARV-XRUEM").setFocus
session.findById("wnd[0]/tbar[0]/btn[11]").press
As you have notice, only A111, B111, C111 keeps changing. In excel they are arranged in a single column row by row. Can u help me make a condition to loop the process until it reaches blank? It would be so much helpful.
Thanks in advance.
Hi,
I am new to SAPGUI scripting. Am tring to access a table get some data of it. Am using SAPFEWSE.ocx
i used SAPFEWSELib and so far i was able to Login and navigate to the table. But I cant extracte specific data from them. Here is my code so far.
Can anyone help me on how to get a value from a table. Am getting error at the redline. PLease help me.
Private Sub loginInfo() sapSession = sapCon.Children(0) With sapSession ' MsgBox(.FindById("wnd[0]/usr/txtRSYST-MANDT").Text) ' .FindById("wnd[0]/usr/txtRSYST-MANDT").Text = "200" ' MsgBox(.FindById("wnd[0]/usr/txtRSYST-MANDT").Text) .FindById("wnd[0]/usr/txtRSYST-BNAME").Text = sapID .FindById("wnd[0]/usr/pwdRSYST-BCODE").Text = sapPassword .FindById("wnd[0]/usr/txtRSYST-LANGU").Text = "EN" .FindById("wnd[0]").SendVKey(0) End With End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Try ' sapID = TextBox1.Text 'sapPassword = TextBox2.Text sap = CreateObject("SAPGUI.Scriptingctrl.1") sapCon = sap.OpenConnectionByConnectionString(sapServer, True) Create_File() loginInfo() prcss_data Catch ex As Exception MsgBox(ex.Message) End Try End Sub Private Sub prcss_data() With sapSession .FindById("wnd[0]/tbar[0]/okcd").text = "se16" .FindById("wnd[0]").sendvKey(0) .FindById("wnd[0]/usr/ctxtDATABROWSE-TABLENAME").text = "zu1cd_fkkvkp" .FindById("wnd[0]/usr/ctxtDATABROWSE-TABLENAME").caretPosition = 12 .FindById("wnd[0]").sendVKey(0) '.FindById("wnd[0]/usr/ctxtI1-LOW").text = "W573121387" '.FindById("wnd[0]").sendVKey(8) '.FindById("wnd[0]/usr/ctxtI1-LOW").text = "" .FindById("wnd[0]/usr/ctxtI1-LOW").caretPosition = 0 .FindById("wnd[0]").sendVKey(8) .FindById("wnd[0]/usr/cntlGRID1/shellcont/shell").setCurrentCell(-1, "GPART") .FindById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn("GPART") .FindById("wnd[0]/tbar[1]/btn[40]").press Dim stt As String For i = 1 To 10 stt = .FindById("wnd[0]/usr/cntlGRID1/shellcont/shell").setCurrentCell(1, 3) .FindById("wnd[0]/usr/txtI2-LOW").caretPosition = 10 .FindById("wnd[0]/usr/txtI2-LOW").setFocus Write_log(stt) Next .FindById("wnd[0]").sendVKey(3) .FindById("wnd[0]/usr/ctxtI1-LOW").text = "0200000882" .FindById("wnd[0]/usr/txtI2-LOW").setFocus .FindById("wnd[0]/usr/txtI2-LOW").caretPosition = 10 .FindById("wnd[0]").sendVKey(8) .FindById("wnd[0]/usr/cntlGRID1/shellcont/shell").currentCellColumn = "OFFCYCLE" .FindById("wnd[0]/usr/cntlGRID1/shellcont/shell").firstVisibleColumn = "BUSINITCODE" End With End Sub Dim fs As Object Dim fs_file As Object Dim fname As String Private Sub Write_log(ByVal linestr As String) fs_file.writeline(linestr) End Sub Private Sub Create_File() fs = CreateObject("Scripting.FileSystemObject") fname = My.Application.Info.DirectoryPath + "\Log" + Date.Now.ToString("yyyyMMddHHmmss") & ".csv" fs_file = fs.CreateTextFile(fname, True) End Sub
Hello bhagavath,
welcome in the Scripting Language forum.
If you want to read the content of a cell of the GuiGridView object in the SE16 transaction code you must use the method GetCellValue. Replace the code inside your loop with this:
For i = 1 To 10
stt = .FindById("wnd[0]/usr/cntlGRID1/shellcont/shell").getCellValue(i, "YourColumnName")
.FindById("wnd[0]/usr/txtI2-LOW").caretPosition = 10
.FindById("wnd[0]/usr/txtI2-LOW").setFocus
Write_log(stt)
Next
Note that your must use the name of the column and not the number.
You can find an interesting example here.
Let us know your results.
Hint: In the actual help file of the SAP GUI Scripting 7.40 PL 7 is the method GetCellValue not longer documented. I hope that doesn't mean anything.
Cheers
Stefan
Hello Sagar,
welcome in the Scripting Language forum.
As far as I understand you correct, you want to control a Windows "Save As" dialog via VBA.
You can find an excellent solution for this requirement from Holger Köhn here.
Let us know your results.
Cheers
Stefan
hello Holger, I hope you can help me with this dilemma Having the same problem too. I have the filepath inside my excel sheet. I got everything up and running (validations, loop, etc..) I just can't figure out how to do a code that will copy the path from my excel sheet, then paste it in the dialogbox in SAP
Public Sub AttachNow()
doc = ActiveCell.Value
attachment = ActiveCell.Offset(0, 1).Value 'this is the cell value where the filepath is copied
salesorg = Range("F3").Value
Dim current As Workbook
Set current = ActiveWorkbook
Dim ARlayout As String
Dim objExcel
Dim objSheet, intRow, i
Set objExcel = GetObject(, "Excel.Application")
Set objBook = objExcel.ActiveWorkbook
Set SapGuiAuto = GetObject("SAPGUI") 'Get the SAP GUI Scripting object
Set SAPApp = SapGuiAuto.GetScriptingEngine 'Get the currently running SAP GUI
Set SAPCon = SAPApp.Children(0) 'Get the first system that is currently connected
Set session = SAPCon.Children(0) 'Get the first session (window) on that connection
'Start the transaction to access FB03
session.findById("wnd[0]").resizeWorkingPane 235, 41, False
session.findById("wnd[0]/tbar[0]/okcd").Text = "/nFB03"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/txtRF05L-BELNR").Text = doc
session.findById("wnd[0]/usr/ctxtRF05L-BUKRS").Text = salesorg
session.findById("wnd[0]/usr/ctxtRF05L-BUKRS").SetFocus
session.findById("wnd[0]/usr/ctxtRF05L-BUKRS").caretPosition = 4
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/titl/shellcont/shell").pressContextButton "%GOS_TOOLBOX"
session.findById("wnd[0]/titl/shellcont/shell").selectContextMenuItem "%GOS_PCATTA_CREA"
'put code to paste path in dialog box here
session.findById("wnd[0]/tbar[0]/okcd").Text = "/n"
End Sub
Having the same problem too. I have the filepath inside my excel sheet. I got everything up and running (validations, loop, etc..) I just can't figure out how to do a code that will copy the path from my excel sheet, then paste it in the dialogbox in SAP
Public Sub AttachNow()
doc = ActiveCell.Value
attachment = ActiveCell.Offset(0, 1).Value 'this is the cell value where the filepath is copied
salesorg = Range("F3").Value
Dim current As Workbook
Set current = ActiveWorkbook
Dim ARlayout As String
Dim objExcel
Dim objSheet, intRow, i
Set objExcel = GetObject(, "Excel.Application")
Set objBook = objExcel.ActiveWorkbook
Set SapGuiAuto = GetObject("SAPGUI") 'Get the SAP GUI Scripting object
Set SAPApp = SapGuiAuto.GetScriptingEngine 'Get the currently running SAP GUI
Set SAPCon = SAPApp.Children(0) 'Get the first system that is currently connected
Set session = SAPCon.Children(0) 'Get the first session (window) on that connection
'Start the transaction to access FB03
session.findById("wnd[0]").resizeWorkingPane 235, 41, False
session.findById("wnd[0]/tbar[0]/okcd").Text = "/nFB03"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/txtRF05L-BELNR").Text = doc
session.findById("wnd[0]/usr/ctxtRF05L-BUKRS").Text = salesorg
session.findById("wnd[0]/usr/ctxtRF05L-BUKRS").SetFocus
session.findById("wnd[0]/usr/ctxtRF05L-BUKRS").caretPosition = 4
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/titl/shellcont/shell").pressContextButton "%GOS_TOOLBOX"
session.findById("wnd[0]/titl/shellcont/shell").selectContextMenuItem "%GOS_PCATTA_CREA"
'put code to paste path in dialog box here
session.findById("wnd[0]/tbar[0]/okcd").Text = "/n"
End Sub
hello Script Man, I hope you can help me with this dilemma
Hello,
This is my first post here so sorry if it's out of place.
Background : I'm doing an automation on our SAP, and we only have access to the front end, thus the necessity of scripting. I'm doing it on VBA in excel but due to the nature of the question I think this should be asked here and not on Stack Overflow.
Project nature: Update several fields in SAP, transaction VA02 for example
Issue: Being able to handle SAP status bar messages whenever they appear
So, sometimes SAP can yield a msg on the status bar, either a Warning, Error or Information. I know how to capture that menssage and code referencing the status bar, with that I could create a function and run it whenever I think an status bar change could happen but that would result in hundreds of calls on said function and I could simply miss where I should put the function and left a potential error spot forgotten.
What I want to do: Create a listener to handle whenever the status bar shoots and change event.
To be able to do that I need the name of the event to listen to, and to have the name and declaration I would need the class that does that, and since the class if created on SAP the only way I would be able to do that would be to reference the DLL that describes such class/event.
I can't find this DLL, not I'm sure this is the best approach/will work. I tried to explore the DLLs that I have on my SAP but I couldn't view the code on them with dotPeek or a similiar program
Questions:
1 - Is the theory of my solution sound?
2 - If I manage to find the correct DLL would it work?
3 - How can I find this DLL?
Thanks all for the time to read and maybe reply =)
Hi Michael and Stefan,
I'm new to SAP and VBA. I'm currently on a project in which I need to print (generate pdf doc) via CutePDF Writer. I'm able to select Print option in SAP (via script recorder) however after that I received two windows one to select printer and after selecting OK from this window it will ask to select path to Save.
How I should control both these window and select correct options ?
Thanks Stefan,
I tried with Holger Kohn's solution, but don't know what I'm doing wrong.
I have created another module and inserted Holger Kohn's code and from my main module I'm calling it. I have added the call function after the line where SaveAs window pop-up. Is it correct ? as the code stop at the SaveAs window. After I manually click on cancel / save button, only then it start executing the rest of the code/line.
I'm I doing it correct..please help me out in this...
Code:
If Not IsObject(App) Then
Set SapGuiAuto = GetObject("SAPGUI") 'Get the SAP GUI Scripting objects
Set App = SapGuiAuto.GetScriptingEngine 'Get the currently running SAP GUI
End If
If Not IsObject(connection) Then
Set connection = App.Children(0) 'Get the first system that is currently connected
End If
If Not IsObject(session) Then
Set session = connection.Children(0) 'Get the first session (window) on that connection
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject App, "on"
End If
AppActivate session.findById("wnd[0]").Text 'to bring the SAP-window to the foreground.
For i = 8 To cnt
application.StatusBar = "Working on " & wks.Range("B" & i).Value & " ...."
'SAP T code
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").Text = "zfi_jva_sst"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[1]/btn[17]").press
session.findById("wnd[1]/usr/txtENAME-LOW").Text = ""
session.findById("wnd[1]/usr/txtENAME-LOW").SetFocus
session.findById("wnd[1]/usr/txtENAME-LOW").caretPosition = 0
session.findById("wnd[1]/tbar[0]/btn[8]").press
session.findById("wnd[1]/usr/cntlALV_CONTAINER_1/shellcont/shell").setCurrentCell 24, "TEXT"
session.findById("wnd[1]/usr/cntlALV_CONTAINER_1/shellcont/shell").firstVisibleRow = 15
session.findById("wnd[1]/usr/cntlALV_CONTAINER_1/shellcont/shell").selectedRows = "24"
session.findById("wnd[1]/usr/cntlALV_CONTAINER_1/shellcont/shell").doubleClickCurrentCell
'Input ASL number
session.findById("wnd[0]/usr/ctxtS_KUNNR-LOW").Text = wks.Range("B" & i).Value
'Input report generated date
session.findById("wnd[0]/usr/ctxtS_BUDAT-HIGH").Text = GenDate
'Input report (period) date
session.findById("wnd[0]/usr/ctxtP_ASDAT").Text = ReportDate
session.findById("wnd[0]/usr/ctxtS_KUNNR-LOW").SetFocus
session.findById("wnd[0]/usr/ctxtS_KUNNR-LOW").caretPosition = 8
session.findById("wnd[0]/tbar[1]/btn[8]").press
'Application.Wait (Now + TimeValue("0:00:01"))
If Err.Number = 619 Then
wks.Range("D" & i).Value = "No details available"
Else
session.findById("wnd[0]/usr/cntlCC_ALV/shellcont/shell").firstVisibleRow = 11
session.findById("wnd[0]/usr/cntlCC_ALV/shellcont/shell").firstVisibleColumn = "DEAL_PARENT"
'///////////////////////////////////////////////////////////////////////////////////////
'code to export / download excel file
'///////////////////////////////////////////////////////////////////////////////////////
session.findById("wnd[0]/usr/cntlCC_ALV/shellcont/shell").pressToolbarContextButton "&MB_EXPORT" 'old
session.findById("wnd[0]/usr/cntlCC_ALV/shellcont/shell").selectContextMenuItem "&XXL" 'old
FilePath1 = FilePath & wks.Range("B" & i).Value & ".xlsx" Declaring file path
session.findById("wnd[0]/tbar[1]/btn[8]").press 'Here on this line SaveAs window pop-up & code stop executing unless I manually click on cancel/save button
Call Auto_SaveAs_SAP(FilePath1) 'here I'm calling Holger Kohn code
......
.....
.....
Hello Marcos,
welcome in the Scripting Language forum.
Your requirement is very interesting.
To your questions:
3. The DLL you are searching for is the sapfewse.ocx (SAP Front End Windows Scripting Engine). You can find it in the directory Program Files (x86)\SAP\FrontEnd\SAPgui. Here you find the GuiStatusBar object with its properties and methods but without any event.
2. Mhmm, yes and no. No, it doesn't work with the SAP GUI Scripting standard because there is no event in the GuiStatusBar class. Yes, it works if you define your own event via a callback routine.
1. Yes the theory of your solution sounds good. Here a solution in AutoIt.
;-Begin-----------------------------------------------------------------
;-Include files-------------------------------------------------------
#Include "Include\WindowsConstants.au3"
#Include "Include\GuiListbox.au3"
;-Constants-----------------------------------------------------------
Const $WinTitle = "[CLASS:SAP_FRONTEND_SESSION]"
;-Variables-----------------------------------------------------------
Global $hList
Global $StatusBar1 = "[CLASS:Afx:"
Global $StatusBar2 = ":8:00010003:00000010:00000000]"
;-Function MyCallback-------------------------------------------------
Func MyCallback($uiMsg, $wParam, $lParam)
Switch $uiMsg
Case $WM_SETTEXT
_GUICtrlListBox_AddString($hList, "WM_SETTEXT(" & $wParam & _
"," & $lParam & ")")
Local $hStruc = DllStructCreate('char[256]', $lParam)
_GUICtrlListBox_AddString($hList, DllStructGetData($hStruc, 1))
EndSwitch
Return 0
EndFunc
;-Sub Main------------------------------------------------------------
Func Main()
Local $hGUI = GUICreate("Subclass", 400, 400)
Local $cList = GUICtrlCreateList("", 8, 8, 384, 384, _
BitOR($WS_BORDER, $WS_VSCROLL))
GUISetState()
$hList = GUICtrlGetHandle($cList)
Local $hDSSUBCLS = DllOpen("dssubcls.dll")
If $hDSSUBCLS = -1 Then
Return
EndIf
Local $hWin = WinGetHandle($WinTitle)
Local $StatusBar = $StatusBar1 & _
Hex(_WinAPI_GetWindowLong($hWin, $GWL_HINSTANCE)) & $StatusBar2
Local $hStatusBar = ControlGetHandle($WinTitle, "", $StatusBar)
Local $hCallback = DllCallbackRegister("MyCallback", "long", _
"long;long;long")
Local $aRet = DllCall($hDSSUBCLS, "long", "SubClass", "hwnd", _
$hStatusBar, "ptr", DllCallbackGetPtr($hCallback), "long", 0, _
"long", 0, "long", 0, "long", 1)
$aRet = DllCall($hDSSUBCLS, "long", "UseSendMessage", "long", 1)
While GUIGetMsg() <> -3
Sleep(25)
Wend
DllClose($hDSSUBCLS)
GUIDelete()
EndFunc
;-Main----------------------------------------------------------------
Main()
;-End-------------------------------------------------------------------
I register a callback routine to the statusbar and if the text change I catch WM_SETTEXT.
The DLL for subclassing you can find here.
I know you use VBA, but I think it is basically important to know that the way you described is working.
Hint:Here a link to a post how to get the handles of the UI objects of the SAP GUI for Windows.
Let us know your results.
Cheers
Stefan
Hi Holger Kohn,
I'm trying to export reports from SAP through VBA and facing the same issue.
I have tried to use your solution by pasting your above code in my 2nd module and I'm calling it from my main module after the save as window pop-up. Is this correct ? as my code on main module stop executing at SaveAs window.
Can you help me in this?
My code is as below -
session.findById("wnd[0]/usr/cntlCC_ALV/shellcont/shell").pressToolbarContextButton "&MB_EXPORT"
session.findById("wnd[0]/usr/cntlCC_ALV/shellcont/shell").selectContextMenuItem "&XXL"
'Declaring the file path
FilePath1 = FilePath & wks.Range("B" & i).Value & ".xlsx"
'Here the SaveAs window pop-up and the VBA code stop executing untill I manually click on save/cancel button
session.findById("wnd[0]/tbar[1]/btn[8]").press
Call Auto_SaveAs_SAP(FilePath1)
Hello Sagar,
I modify Holgers code a little bit
'==> Get the handle of the Save Button in the Save As Dialog Box
ChildRet = FindWindowEx(Ret, ByVal 0&, ByVal "Button", ByVal "Cancel")
'ChildRet = FindWindowEx(Ret, ByVal 0&, ByVal "Button", ByVal "Abbrechen")
ChildRet = GetWindow(ChildRet, GW_HWNDPREV)
because I have some trouble with German umlauts (Sch&reibgeschützt öffnen instead Sch&reibgeschützt Öffnen) and it works perfect.
I copy a spool number from SP02 in the clipboard, call the report RSTXPDFT4 via SE38, paste the spool number into the spool request and execute the report. So it opens a "Save As" dialog for a PDF. Now I start Holgers code from VBA and with the modification it works perfect. Please try the same way to check if it basically works.
You use the transaction code zfi_jva_sst, it is an individual TAC, so it is not possible to support you for your detail requirement. It is in this case necessary to abstract your case.
Let us know your results.
Cheers
Stefan
Hi Stefan,
Thank you a lot for the reply, it's good to know that it can work. I'm beeing presured to deliver this now so I'm getting away with the handling functions strategically placed but as soon as I can get some free time I will convert this to VBA and post here for anyone else who is looking for it =)
Hello.
To achieve such function in VBA code is not possible as this require to run code parallel.
MS VBA code is single thread and each code line need completely finished before next line will start.
But we know that statusbar messages only appear when we have an Trigger command send.
Like 'SAVE' or sendvkey.
So we can make an Matrix how different Scenario we need to cover. According to this we can decide if a few functions can be used instead of seperate code line for Trigger this Event.
If we have to many Scenario it make sense to create an customized CLS in VBA.