jbb897 Posted October 11, 2022 Report Share Posted October 11, 2022 Hi all, after I run a simple macro (with the changes being made in Microsoft Excel such as copying and pasting, inserting columns, etc.) I have display problems in Excel. Consistently, Macro Express Pro is typing text and doing other commands in Excel, but if I watch the screen, I cannot see anything being done in Excel on the screen real-time. Then when the macro finishes, if I double click in a cell, or change the maximized Excel window to a different size (drag it to a different screen can do this) suddenly all of the changes the macro has made show up. Any ideas? This only happens with Macro Express Pro and Excel. The fix for me is typically to shut down Macro Express Pro, close down all my open Excel files, and relaunch which is frustrating. Sometimes it is not fixed unless I restart my Windows 10 laptop. Macro Express Pro version is 6.4.0.1 Windows 10 64-bit Thanks! Quote Link to comment Share on other sites More sharing options...
Bruce Thomson Posted October 11, 2022 Report Share Posted October 11, 2022 'Just a thought... Consider moving the spreadsheet over to Google Sheets instead of Excel. The advantage is that it constantly backs up, so you don't lose data, and it's accessible when you are mobile, from any device. It doesn't have some functionality, but has other functionalities, 'sort of a balance. I use it mostly now instead of Excel (which I have extensively used and taught and loved) Quote Link to comment Share on other sites More sharing options...
rberq Posted October 11, 2022 Report Share Posted October 11, 2022 A couple wild guesses: 1) Do you have a "reasonable" keystroke speed set in your macro? I generally use "Keystroke Speed: 30 milliseconds" in any macro that does typing, at least initially; then later I may speed up or slow down the typing if necessary. I think Excel or Windows will buffer the keystrokes if the macro types them too fast, but that has its limitations if the buffer fills up. 2) Are you sure the Excel window has focus when the macro begins typing? I have a couple macros that "Wait for mouse click" before they begin to type. That way, I manually click on the first cell the macro will type into, so both the Excel sheet and the proper cell are active when typing begins. Quote Link to comment Share on other sites More sharing options...
acantor Posted October 12, 2022 Report Share Posted October 12, 2022 It sounds like Excel can't handle the input as fast as Macro Express sends keystrokes. One option, as rberq suggested, is to experiment with different keystroke speeds: Keystroke Speed: 100 milliseconds Another option is to insert pauses between steps: Text Type (Simulate Keystrokes): %x%<TAB>%y%<TAB>%z%<TAB> Delay: 100 milliseconds Text Type (Simulate Keystrokes): %a%<TAB>%b%<TAB>%c%<TAB> Delay: 100 milliseconds A third option is to reduce the quantity of information each text type command sends: Text Type (Simulate Keystrokes): %x%<TAB> Text Type (Simulate Keystrokes): %y%<TAB> Text Type (Simulate Keystrokes): %z%<TAB> Fourth, combine all of the above: Keystroke Speed: 100 milliseconds Text Type (Simulate Keystrokes): %x% Delay: 100 milliseconds Text Type (Simulate Keystrokes):<TAB> Delay: 100 milliseconds Text Type (Simulate Keystrokes): %y% Delay: 100 milliseconds Text Type (Simulate Keystrokes):<TAB> Delay: 100 milliseconds Text Type (Simulate Keystrokes): %z% Delay: 100 milliseconds Text Type (Simulate Keystrokes):<TAB> Delay: 100 milliseconds The last example might be overkill. But it might be a good place to start. If it works, winnow out the steps that don't make a difference. Quote Link to comment Share on other sites More sharing options...
jbb897 Posted October 12, 2022 Author Report Share Posted October 12, 2022 Thanks for the suggestions, all. Here is the macro below. I don't believe that 1500 milliseconds would be causing any delay or issues. I do have six monitors that all use DisplayLink software/drivers, so perhaps MacroExpress is not fully compatible with this setup and that is causing problems. <REPEAT START Start="1" Step="1" Count="5000" Save="FALSE" Variable="%N[1]%"/> <MACRO PLAYBACK SPEED Speed="0.1"/> <WINDOW ACTIVATE Title="2022-10-11 Endocrinology.xlsx - Excel" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <DELAY Flags="\x02" Time="1500"/> <WAIT FOR LEFT MOUSE CLICK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0" _ENABLED="FALSE"/> <MOUSE LEFT CLICK _ENABLED="FALSE"/> <TEXT TYPE Action="0" Text="<SHIFT><SPACE>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<SHIFT><SPACE>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<CTRL>c"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<CTRL>+"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ARROW RIGHT><ARROW LEFT>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<CTRL>c"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ARROW DOWN><ARROW LEFT>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<CTRL>v"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<F2>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ENTER>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ARROW UP>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ARROW RIGHT>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="4"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ARROW UP>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="3"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ARROW UP>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="2"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ARROW UP>"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="1"/> <DELAY Flags="\x02" Time="1500"/> <TEXT TYPE Action="0" Text="<ARROW DOWN>"/> <TEXT TYPE Action="0" Text="<ARROW DOWN>"/> <TEXT TYPE Action="0" Text="<ARROW DOWN>"/> <TEXT TYPE Action="0" Text="<CTRL><ARROW DOWN>"/> <TEXT TYPE Action="0" Text="<ARROW DOWN>"/> <TEXT TYPE Action="0" Text="<ARROW DOWN>"/> <DELAY Flags="\x02" Time="1500"/> <DELAY Flags="\x02" Time="1500"/> <END REPEAT/> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.