View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Quandan - Marcel Kreijne Quandan - Marcel Kreijne is offline
external usenet poster
 
Posts: 4
Default 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/