creating macro to ask for variable info when excel starts

  • Thread starter Thread starter Flyriverside
  • Start date Start date
F

Flyriverside

Hello, I don't understand visual basic at all, so don't understand the
help that comes with Excel 2002. We create proposals for different
companies using Excel, but sometimes the guys forget to change the
name of the customer on the proposal. Is there a way I can get the
proposal to ask for the customer's name and enter it in a cell when a
person starts the spreadsheet for the 1st time?

Thanks for any help.
 
Sub Auto_Open()
Dim sCust

sCust = InputBox("Please supply customer number", _
"Custmomer Proposal", _
Worksheets("Sheet1").Range("A1").Value)
If sCust <> "" Then
Worksheets("Sheet1").Range("A1").Value = sCust
End If

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top