Dialog Box

  • Thread starter Thread starter Aussie
  • Start date Start date
A

Aussie

I need some simple advice on how to make a dialog box launch with the auto
open macro to have a value entered by the user and pasted in a cell on the
worksheet. Thanks in advance.
 
Look in VBA help for Application.InputBox
I use this in an autofilter for entering are codes when filtering on phone
numbers

Sub Area_Code()
Application.ScreenUpdating = False
UserVal = Application.InputBox("Enter Area Code")
If UserVal = False Then
Exit Sub
Else
Selection.AutoFilter Field:=4, Criteria1:=UserVal & "*", Operator:=xlAnd
End If
Application.ScreenUpdating = True
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