Pop-Up Box

C

cassy01

IS IT POSSIBLE TO:

When i click on a button a pop-up box appears where it asks the user to
enter a value then clicks "ok" ?

When clicking ok the value in the box is sent to cell "A64".

Many Thanks
Benn
 
D

Dave Peterson

Maybe...

Private sub Commandbutton1_Click()
Sheets("Form").range("a64").value = Textbox1.Text
End Sub

It'll do the work when they hit that Commandbutton1 (ok???) button.
 
K

keithl816

Cassy01,

I'm confused on what you are trying to say. I assumed that you already
have a command button that prompts a userform. If not create one. Click
on design mode, click on the commandbutton then right click, pick view
code and place this code into the sheet. This will make the userform
appear.


Code:
--------------------

Private Sub Commandbutton1
Application.Visible = False
UserForm1.show
Application.Visible = True

--------------------


Make sure you have already created the userform before tyring this
code.

The codes given earlier need to be placed into the userform with the
textbox and commandbutton that you are intending to use.




Code:
--------------------

Private sub Commandbutton1_Click()
Sheets("Sheet1").Activate
Cells(64, 1) = Textbox1.Text
End Sub

Private Sub Textbox1_Change()
End Sub
--------------------


This was based on your first question below:

"When i click on a button a pop-up box appears where it asks the user
to enter a value then clicks "ok" ?"

When clicking ok the value in the box is sent to cell "A64".
 

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

Similar Threads


Top