ashutosh152
New Member
- Joined
- Jan 7, 2011
- Messages
- 2
Problem in running dtexec command with multiple parameters in macro:-
------code in macro-----
Dim Rsvr As String
Dim Runm As String
Rsvr = Sheets("update_xml").Range("C6")
Runm = Sheets("update_xml").Range("C7")
' MsgBox Rsvr ----value= Hi
' MsgBox Runm ----value= Hello
Call Shell("DTEXEC /f C:\Macro\xml_Table_updated_xml.dtsx /set \package.variables[User::InputRsvr].Value;&Rsvr /set \package.variables[User::InputRunm].Value;&Runm", vbNormalFocus)
when i run this macro, &Rsvr and &Runm in dtexec command is not assigned the values, i wanted these variables to be replaced by the "Hi" and "Hello" respectively.
I cannot hard code the values of the variables as they dynamic.
Please guide me how can provide parameters in call shell.
------code in macro-----
Dim Rsvr As String
Dim Runm As String
Rsvr = Sheets("update_xml").Range("C6")
Runm = Sheets("update_xml").Range("C7")
' MsgBox Rsvr ----value= Hi
' MsgBox Runm ----value= Hello
Call Shell("DTEXEC /f C:\Macro\xml_Table_updated_xml.dtsx /set \package.variables[User::InputRsvr].Value;&Rsvr /set \package.variables[User::InputRunm].Value;&Runm", vbNormalFocus)
when i run this macro, &Rsvr and &Runm in dtexec command is not assigned the values, i wanted these variables to be replaced by the "Hi" and "Hello" respectively.
I cannot hard code the values of the variables as they dynamic.
Please guide me how can provide parameters in call shell.