Hi,
I am doing a VBA code in Excel to run a Stored Procedure from SQL database.
The uid (user id) and wsid (workstation id) are specific to my username and my workstation.
How do I set them up as variables so other ppl can run it.
Here is portion of my code:
___________________________________________________________
With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
"ODBC;DRIVER=SQL Server;SERVER=A;UID=B;APP=Microsoft Office 2003;WSID=C;DATABASE=D;Trusted_Connectio" _
), Array("n=Yes")), Destination:=Range("C8"))
.CommandText = Array("dbo.vlCTincidentsRPTS @selectRPT = '' " + Range("Sheet2!A1").Value + StrCellValue + Range("Sheet2!A1").Value)
___________________________________________________________
Thanks in advance!
Omar
I am doing a VBA code in Excel to run a Stored Procedure from SQL database.
The uid (user id) and wsid (workstation id) are specific to my username and my workstation.
How do I set them up as variables so other ppl can run it.
Here is portion of my code:
___________________________________________________________
With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
"ODBC;DRIVER=SQL Server;SERVER=A;UID=B;APP=Microsoft Office 2003;WSID=C;DATABASE=D;Trusted_Connectio" _
), Array("n=Yes")), Destination:=Range("C8"))
.CommandText = Array("dbo.vlCTincidentsRPTS @selectRPT = '' " + Range("Sheet2!A1").Value + StrCellValue + Range("Sheet2!A1").Value)
___________________________________________________________
Thanks in advance!
Omar