-
Solved: Msgbox
Hello, I have to open a file from the local hard drive to perform some calculation. Because everyone as a unique my document folder. Therefore, I set up the following.
[vba]
Dim wkbPrime As Workbook, wkbMacro As Workbook, wkbCallSheet As Workbook, _
strNTuser As String
Set wkbPrime = Application.Workbooks.Open _
("C:\Documents and Settings\" & UserForm1.txtntuser & "\My Documents\frmPrime.xls")
Set wkbMacro = Application.Workbooks("User Form.xls")
Set wkbCallSheet = Application.Workbooks.Open _
("\\fil-nw-312\QA_787_Vis\Daily Metrics\Call_sheet\Call-Sheet-Analysis.xls")
[/vba]
The text box allow user to input there user name in and it will locate the correct path. however, if I input the wrong one, it will give me this error (attached picture).
I want to create an if state to to display a message box to let them know that the nt user name they input is incorrect and give them a chance to input a new one. Can you guys help me.
thanks in advance
Last edited by lucas; 12-08-2008 at 08:47 AM.
Reason: VBA tags added to code
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules