ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SendKeys variable (https://www.excelbanter.com/excel-programming/384818-sendkeys-variable.html)

snax500

SendKeys variable
 
In Excel2000, I have the following code ...

Application.SendKeys "alk51", True

This code sends my password to another application. The problem is
that I have this code in many places since I am running many reports
from this application. Can I use a variable with SendKeys so that I
only have to change my password once?

Thanks


Harbinger

SendKeys variable
 
create a password string constant?

dim strPassword as string
strPassword = "alk51"

and then in the application:
Application.SendKeys strPassword, True


"snax500" wrote:

In Excel2000, I have the following code ...

Application.SendKeys "alk51", True

This code sends my password to another application. The problem is
that I have this code in many places since I am running many reports
from this application. Can I use a variable with SendKeys so that I
only have to change my password once?

Thanks




All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com