Hello! I have an issue setting up a time delay for my macro, so a file can be opened trough .odc file.
So i need to give time to the .odc file to executes and open the excel file with the table inside, and afterwards all cells to be selected for extraction or processing.
The part of the code where i want to put a delay/buy time is just before the command for Cells selection. I thing i need a simple loop, but i'm not familiar with loops. Maybe Wait function is just pausing the macro run and that's why i see first all cells selection and afterwards the .odc file execution.
Can you help me with adding time to open the .odc file properly please?
So i need to give time to the .odc file to executes and open the excel file with the table inside, and afterwards all cells to be selected for extraction or processing.
The part of the code where i want to put a delay/buy time is just before the command for Cells selection. I thing i need a simple loop, but i'm not familiar with loops. Maybe Wait function is just pausing the macro run and that's why i see first all cells selection and afterwards the .odc file execution.
Can you help me with adding time to open the .odc file properly please?
VBA Code:
Sub Open_Any_File()
VBA.Shell "explorer.exe C:\Raychi files\TSO Metered Data\EnergoPro_Meterd_Data.odc"
Application.Wait (Now + TimeValue("0:00:10"))
ActiveSheet.Cells.Select
End Sub