Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
two small questions
1. How would I write this code? I need a workbook to not close using the X in the top right corner. I want it to put up an error message saying to use the Exit button. I know how to do the message box, but when I try using the beforeclose call, I cant figure out how to write code to stop the procedure once it's started. just a plain exit sub doesnt work... and 2. Is there a way, to have a textbox, that the user will click on a button next to it, and it will open up a "explorer" box for them to search for a file. Basically, I need something that will let them select a file, and it's going to put the direct link (C:\windows\...) in a textbox. Is this possible? I'm sure it is, I just don't know how to do it. Thanks everyone for your help... -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=500430 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
two small questions
First one:
Cancel = True Second one: Lookup this one in the help: Application.GetOpenFilename RBS "dok112" wrote in message ... 1. How would I write this code? I need a workbook to not close using the X in the top right corner. I want it to put up an error message saying to use the Exit button. I know how to do the message box, but when I try using the beforeclose call, I cant figure out how to write code to stop the procedure once it's started. just a plain exit sub doesnt work... and 2. Is there a way, to have a textbox, that the user will click on a button next to it, and it will open up a "explorer" box for them to search for a file. Basically, I need something that will let them select a file, and it's going to put the direct link (C:\windows\...) in a textbox. Is this possible? I'm sure it is, I just don't know how to do it. Thanks everyone for your help... -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=500430 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
two small questions
thanks for the answer to the first one. for 2, I dont want it to open the file. I just want it to put the path for it. What I'm trying to do, is write a macro that is going to run down a list of these and email the file at that path to the person in A1.... -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=500430 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
two small questions
I GOT IT!! WOO HOO!! Thank you!! -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=500430 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
two small questions
You don't have to open the file and you can just get the file path:
strFilePath = _ Application.GetOpenFilename(FileFilter:="Text Files (*.txt), *.txt", _ Title:="Point to a text file") MsgBox strFilePath You also could use this one: vDialogResult = _ Application.GetSaveAsFilename(InitialFileName:=str DefaultFilePath, _ FileFilter:="Text Files (*.txt), *.txt") RBS "dok112" wrote in message ... thanks for the answer to the first one. for 2, I dont want it to open the file. I just want it to put the path for it. What I'm trying to do, is write a macro that is going to run down a list of these and email the file at that path to the person in A1.... -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=500430 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Answers to questions posing more questions in a workbook | Excel Worksheet Functions | |||
New Questions.. message box too small | Excel Discussion (Misc queries) | |||
View Questions and Answer to questions I created | Excel Discussion (Misc queries) | |||
2 Small VBA Questions; Text To Columns and Naming First Sheet | Excel Discussion (Misc queries) | |||
ISERROR,SMALL,INDEX, MATCH, SMALL?? | Excel Discussion (Misc queries) |