Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel ask a Question when opened

Status
Not open for further replies.

CadMaster

Technical User
Aug 4, 2001
38
is there a way to have excel (2003) ask a question as soon as it is opened.. and fill in a predetermined cell with the data?
i have an invoice form.. and would like it to ask "HAS THE PREVIOUS BILLING OF $XXX BEEN PAID? (reads an amount from cell)... then have the option of selecting YES, or NO, or enter a different amount.. then it fills in that cell automatically.. i've made a pdf file explaining the current form i have.. its either attached or at this link (
thanks for the help
 
An Auto_Open() sub will run whenever the workbook is opened. The code must be in a regular code module.

Since you have three possible options (paid none, paid some, paid in full) you probably need a userform (as opposed to a MsgBox / InputBox combination). It appears that the userform needs a frame with three option buttons (default set to the "Paid None" option), a text box set to the value of range("F20"), an OK and a Cancel button. Then show the userform. You will have to decide whether the user will be entering the previous payment (and do the math in the background before changing the value of "F20") or simply entering the new balance. Make sure you run checks on the input your user makes into the textbox to insure that it IsNumeric. If you want to get fancy, start with the textbox.enabled = false. When the user selects the "Paid some" option, set the textbox.enabled = True. Selecting the "paid in full" option should set the value of the textbox = 0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top