VBA refresh code from a macro in different sheet

mockingbirdsk

New Member
Joined
Nov 24, 2008
Messages
5
Hi all,
I have a looot of work books which get data from different tables in a same oracle database.

I am trying not to include the VBA code in the same work sheet as people can see the passwords for the database when they open the object explorer( i know we can lock the project windows) and also due to the fact that there is a fire wall which deletes attachments when there is a VBA code in it(i know we can rename the sheets and send them to user and then ask them to convert them back with.xls extension,its too much work for some users).

So i am trying to do this by including VBA code in a work sheet on my pc and when i have to refresh the data in the shared drives all i need to do is open my sheet and the shared work sheet,run the macro to refresh the data.

I have done similar kind of thing to lock, unlock and hide work sheets but here the VBA code doesnt work as it asks for the database credentials and path in the pop up box.( example user name 'yellow' database 'green' DSN 'blue')

Is there a way to do this?Any pointers will be much appreciated.
 
Last edited:

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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