Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use macro to enter password?
Hi,
I run a macro that updates external data via ODBC from a Superbase database and then performs calculations on the data. The database is protected through a password that has to be entered in a dialog box each time a table is to be accessed. Typically, the password is entered 5 times in one macro and the password is always the same. In recording a macro, nothing is saved to the macro from the exercise of entering the password. Is there a way to do it "by hand" in VBA, i.e. typing code? (Excel 2003) --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use macro to enter password?
Ankan,
As far as I know you can provide a argument named 'Password:=' to the ODBC call. You can refer that argument to a variable. This variable might be set hard-coded in the macro code (leaving it open to anyone that can read your code), or you might want to have the macro ask for the password once per session and then use it all five times. I suppose, now it is broken into pieces, you can do the exact coding yourself... Kind regards, Marcel Kreijne Quandan - Steunpunt voor spreadsheetgebruikers (Quandan - dutch supportsite for spreadsheetusers) www.quandan.nl "Ankan" schreef in bericht ... Hi, I run a macro that updates external data via ODBC from a Superbase database and then performs calculations on the data. The database is protected through a password that has to be entered in a dialog box each time a table is to be accessed. Typically, the password is entered 5 times in one macro and the password is always the same. In recording a macro, nothing is saved to the macro from the exercise of entering the password. Is there a way to do it "by hand" in VBA, i.e. typing code? (Excel 2003) --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Password to enter the sheet | Excel Worksheet Functions | |||
Macro to select cells in column enter data then press enter | New Users to Excel | |||
How to see macro code of a password protected macro without a password? | Excel Worksheet Functions | |||
Macro to go a WEB site and enter a password | Excel Programming | |||
one line macro to enter password for workbook | Excel Programming |