Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password to enter the sheet Tia[_3_] Excel Worksheet Functions 6 October 13th 08 10:37 PM
Macro to select cells in column enter data then press enter NP New Users to Excel 1 February 20th 08 04:21 PM
How to see macro code of a password protected macro without a password? Dmitry Kopnichev Excel Worksheet Functions 5 October 27th 05 09:57 AM
Macro to go a WEB site and enter a password Bob Benjamin Excel Programming 7 November 14th 03 03:34 PM
one line macro to enter password for workbook N Lenox Excel Programming 5 October 29th 03 08:36 PM


All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"