View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default XL 2003 - Create Dialog Box to Complete Cells...

How about a series of Input boxes whenever sheet1 is activated, but the
boxes only appear if the data is missing? Right-click on the sheet tab,
select view code and paste this the

Private Sub Worksheet_Activate()
If Range("C4").Value = "" Then
Range("C4").Value = InputBox("Enter your Name")
End If
If Range("G4").Value = "" Then
Range("G4").Value = InputBox("Enter your Payroll Number")
End If
If Range("N4").Value = "" Then
Range("N4").Value = InputBox("Enter Date")
End If
End Sub

Mike F
"Birmangirl" wrote in message
...
I have an expense spreadsheet containing two sheets (car mileage & other
expenses). Ideally, when a user opens the template, I'd like them to see a
dialog box asking for Name (say, cell C4), Payroll Number (cell G4) and
Date
(cell N4). When they complete the dialog box and click on OK, the cells
are
populated and the corresponding cells on the second sheet are also
completed
(which I know are just formulae referring to the cells on the first
sheet).
Any help gratefully accepted.

TIA
Amanda