Stop dialog box appearing or click OK using vba when dialog box appears

DWoods

New Member
Joined
Nov 16, 2016
Messages
2
Hi,

I have a number of data queries being refreshed using A
HTML:
ctiveWorkbook.RefreshAll

I have the passwords saved into the connections so that I do not have to enter them while my macro is running. This works for most of the connections however I have a connection to Sage which although it saves the password, still requires me to click ok on a login dialog box. For all other connections this step is bypassed once the username and password are saved in excel.

Is there a way I can OK this dialog box using vba or set it to be bypassed automatically like it does with all other connections? I have tried recording it but the macro recorder records no activity when I click ok.

wmfBtJz
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,214,516
Messages
6,119,981
Members
448,934
Latest member
audette89

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