Hi all,
I'm trying to open the workbook base on Cell value and I would like to open MsgBox and close UserForm if the file does not exsit.
Regards,
tt3
Please Login or Register to view this content.
Hi all,
I'm trying to open the workbook base on Cell value and I would like to open MsgBox and close UserForm if the file does not exsit.
Regards,
tt3
Please Login or Register to view this content.
Last edited by tuongtu3; 12-11-2012 at 03:44 PM. Reason: SOLVED
Hi all,
Any help with this code please. The code is not correct but I posted there just for more details to show what I need.
I have UserForm with TextBox2
1. If TextBox is empty then show msgBox "Please enter Vehicle info" and exit UserForm.
2. If TextBox has entered with value then searching the file in drive "Y:\Testing\"
a_ Open the WorkBook if file name is valid and exit UserForm.
b_ Or Show msgBox "File not found" if file name is invalid and exit UserForm.
Regards,
tt3
Last edited by tuongtu3; 12-11-2012 at 02:22 AM. Reason: Spelling
See attached file where I used this macro:
Regards,Please Login or Register to view this content.
Antonio
Hi Antonio,
The code works on the sample and my worksheet too. Thank you very much for your time and help.
Can you explain why the code have 2 * at ".*xls*") and 1 * at ".xls*")? Does it work as same as without *?
Regards,
tt3
I used jolly chars because excel can have extensions .xls or .xlsm or other... probably I was wrong to use first asterisk, I could use ".xls*".
Regards,
Antonio
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks