RobbieC
Active Member
- Joined
- Dec 14, 2016
- Messages
- 376
- Office Version
- 2010
- Platform
- Windows
Hi there, I have a macro (AddNewPhoto) which allows me to select a photo and put it into my spreadsheet. The macro is triggered from a button on a userform.
I have also got a macro which will launch the camera on my tablet:
this works by launching the app/program from a link on the desktop
My question is:
Am I able to run my 'AddNewPhoto' macro and call my 'launchCamera' sub at the start, but pause the rest of the my macro until I have finished taking the photo (in the camera app)
I don't know if I've explained myself properly, but I'm basically looking to pause Excel whist another program is onFocus and then resume when Excel is back onFocus....
If you can help me throw some light on this, I'd be very grateful
Thanks
I have also got a macro which will launch the camera on my tablet:
Code:
Sub launchCamera()
Dim MyFile As String
Dim Cmd As String
MyFile = "C:\Users\User\Desktop\Camera.lnk"
Cmd = "RunDLL32.EXE shell32.dll,ShellExec_RunDLL "
Shell (Cmd & MyFile)
End Sub
this works by launching the app/program from a link on the desktop
My question is:
Am I able to run my 'AddNewPhoto' macro and call my 'launchCamera' sub at the start, but pause the rest of the my macro until I have finished taking the photo (in the camera app)
I don't know if I've explained myself properly, but I'm basically looking to pause Excel whist another program is onFocus and then resume when Excel is back onFocus....
If you can help me throw some light on this, I'd be very grateful
Thanks