View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Add password to querytable command

Richard,
I find the easiest way to create connection strings is :
- create a new text file somewhere suitable
- rename it "ConnStr.udl"
- double click
- follow the step filling the relevant info
- OK
- Open the file a text editor
- Copy the text

NickHK

"Richard" wrote in message
...
How can I reformat following command to add the password, so I don't have

to
type password every time I run macro

With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=CEFMS;UID=u4rf9rmd;SERVER=cefms.worl d;",
Destination:=Range("C4"))
.CommandText = Array


--
Richard