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