Omkar Posted November 8, 2021 Posted November 8, 2021 Hi I am trying to click on a macro button in excel using - $oWorkbook.Sheets($Sheet).Activate $oExcel_1.Run("01_003737-5.xlsm!PixelTime") I am able to click on the macro successfully but this "01_003737-5.xml" file is autogenerated and every time the filename would be different How can I click on that macro with different filename everytime? Any ideas? Thanks in advance
Danyfirex Posted November 9, 2021 Posted November 9, 2021 It would be great if you can share a working version(modifed) of the Macro/Excel because probably macro has fixed path. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
junkew Posted November 10, 2021 Posted November 10, 2021 You can work with variables if thats what you mean $fileName="01_003737-5.xlsm" $macroName = $fileName & "!PixelTime" $oWorkbook.Sheets($Sheet).Activate $oExcel_1.Run($macroName) FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now