LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default programming input box

I have gotten this far with programming an input box. The box asks for a
file name in which the macro does subsequent processing. I don't know the
file name; the macro will be run by someone else without macro experience so
I need to set this up as foolproof as possible.
There are three things wrong with the following code:
1. the "If temp = 2" statement doesn't work; I am assuming because this is
an input box and I haven't been able to find any help on code for this
2. the applications display alerts = false doesn't work. I don't want
there to be anymore dialogue just close down excel.
3. and three I want the user to be abel to open the excel workbook if it
is not already available.

Thanks,
Nicole

temp = InputBox("What is the name of the PRISM data Excel Workbook you want
me to format for the M101 analysis?")
If temp = 2 Then Application.Quit
If temp = "" Then
MsgBox ("You did not enter a name. Please try again.")
temp = InputBox("What is the name the workbook you want me to format for the
M101 analysis?")
If temp = "" Then
MsgBox ("Excel will now close. Have a good day.")
Application.DisplayAlerts = False
Application.Quit
End If
End If
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
input in number form is being multiplied by 1000 when i input. jweinograd Excel Discussion (Misc queries) 4 April 16th 07 11:18 PM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"