help with a vbs script

BORUCH

Well-known Member
Joined
Mar 1, 2016
Messages
548
Office Version
  1. 365
Platform
  1. Windows
Hi

I have the below vbs script

VBA Code:
Set objExcel = CreateObject("Excel.Application")
objExcel.Application.Run "'C:\Users\jack\AppData\Roaming\Microsoft\AddIns\aaa.xlam'!Module11.dosomething"
objExcel.DisplayAlerts = True
objExcel.Application.Quit
Set objExcel = Nothing

The problem I’m having is that as part of the macro it runs the open file dialog window to select a file and so something with that file, the problem is that if I run the VBS script when i already have windows explorer opened, it opens that file dialog box behind all the open windows it is there anything i can put in the VBS script that will bring it to the front of all open windows ?

Thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
You may have to do this in the module
Try:
VBA Code:
Application.Visible = True
 
Upvote 0
You may have to do this in the module
Try:
VBA Code:
Application.Visible = True
Hi

its not working

the open file dialog box is opening behind all other windows don't forget its not opening the excel application its all via a script in VBS
 
Upvote 0
don't forget its not opening the excel application its all via a script in VBS
I have moved this thread for you to the appropriate forum.
Non-Excel file should be posted to the "General Discussion & Other Applications" forum, not the "Excel Questions" forum.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top