Asked by duncanb7
at 2024-08-06 06:37:59
Point:250 Replies:3 POST_ID:828364USER_ID:11059
Topic:
Microsoft Excel Spreadsheet Software;Visual Basic Programming;Miscellaneous Programming
I have two questions, hope you can help
Question-1
When open new excel application in my VBA code and using application.run to
run the new excel window application module, "'newexcel.xls'!S_main" but
it will take some time to finish the task and the main.xls with VBA code and excel
file is hang-up to stop any editing until
the application is finished. The question is that how can I let the the application.run
function running in background task that won't affect my vba or excel editing or doing
other job in the orginal VBA file, main.xls
'Main.xls file with VBA code
Sub main()
Dim ex As New Excel.Application
ex.Run "'newexcel.xls'!S_main"
ex.ActiveWorkbook.Save
ex.quit
end sub
Question-2, From the question-1 above, I think using Shell command might
be working that won't affect operation of original main.xls file because no any
excel application command involve. RIght ? Could shell command call the
newexcel.xls!Smain module instead of program of newexcel.xls
Please advise
Duncan
Question-1
When open new excel application in my VBA code and using application.run to
run the new excel window application module, "'newexcel.xls'!S_main" but
it will take some time to finish the task and the main.xls with VBA code and excel
file is hang-up to stop any editing until
the application is finished. The question is that how can I let the the application.run
function running in background task that won't affect my vba or excel editing or doing
other job in the orginal VBA file, main.xls
'Main.xls file with VBA code
Sub main()
Dim ex As New Excel.Application
ex.Run "'newexcel.xls'!S_main"
ex.ActiveWorkbook.Save
ex.quit
end sub
Question-2, From the question-1 above, I think using Shell command might
be working that won't affect operation of original main.xls file because no any
excel application command involve. RIght ? Could shell command call the
newexcel.xls!Smain module instead of program of newexcel.xls
Please advise
Duncan