H
Harold Good
Hi, Donald set me on a good path below, but
it's beyond my VBA ability to adapt it to my needs. But it's been a great
exercise to work on it.
I've got the private declaration ok at the top of the VBA page, and the code
I'm trying is below this paragraph. If I enter the path and file name in the
code, it works great. But I'm trying to pass a value from ctrlEthId, which
is located on the same form as my command button. Depending on which project
I've brought up will determine what four digit number is in this ctrlEthId.
I cannot figure out how to pass this value to my code and open the
spreadsheet. I'd sure appreciate any help that anyone can offer.
My code:
Private Sub ProgressSpreadsheet_Click()
Dim sRet As Long
Dim StrCommand As String
'StrCommand = "C:\Documents and Settings\goodh.TSCO\My Documents\!tmp2\"
sRet = ShellExecute(Form.hwnd, "open", _
StrCommand & "me.ctrlethid" & ".xls", "", "", 1)
Thanks,
Harold
===========================================
it's beyond my VBA ability to adapt it to my needs. But it's been a great
exercise to work on it.
I've got the private declaration ok at the top of the VBA page, and the code
I'm trying is below this paragraph. If I enter the path and file name in the
code, it works great. But I'm trying to pass a value from ctrlEthId, which
is located on the same form as my command button. Depending on which project
I've brought up will determine what four digit number is in this ctrlEthId.
I cannot figure out how to pass this value to my code and open the
spreadsheet. I'd sure appreciate any help that anyone can offer.
My code:
Private Sub ProgressSpreadsheet_Click()
Dim sRet As Long
Dim StrCommand As String
'StrCommand = "C:\Documents and Settings\goodh.TSCO\My Documents\!tmp2\"
sRet = ShellExecute(Form.hwnd, "open", _
StrCommand & "me.ctrlethid" & ".xls", "", "", 1)
Thanks,
Harold
===========================================