Creating Ask type field in Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to create a field with similar functionality to the Word field type Ask? I want to create an Excel template that ask me for a customer's name when I open it and then puts what I type in a specific place on the spreadsheet.
 
Hi
you may use the workbook open event. Put the following in your workbook
module (not in a standard module):

Private Sub Workbook_Open()
Dim ret
ret = InputBox("Enter something")
If ret <> "" Then
Me.Worksheets("Sheet1").Range("A1").Value = ret
End If
End Sub
 

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