Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How do I create pop ups in excel?

I'm trying to make a pop up and then have the user enter data into the pop
up. Then use that data to make calculations in the excel sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How do I create pop ups in excel?

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry wrote
in message
...
I'm trying to make a pop up and then have the user enter data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How do I create pop ups in excel?

A more robust method, to capture whether the user clicked Cancel
in the InputBox, is as follows:

Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Chip Pearson" wrote in message
...
The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote in message
...
I'm trying to make a pop up and then have the user enter data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How do I create pop ups in excel?

Ok I'll try to use an inputbox. I work better with examples do you think you
could give me a small example of using an input box when an excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry wrote
in message
...
I'm trying to make a pop up and then have the user enter data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How do I create pop ups in excel?

If you name a macro Auto_Open, it will automatically execute when
the sheet is opened. E.g.,

Sub Auto_Open()
Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Larry Sartoris" <Larry wrote
in message
...
Ok I'll try to use an inputbox. I work better with examples do
you think you
could give me a small example of using an input box when an
excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote
in message
...
I'm trying to make a pop up and then have the user enter
data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default How do I create pop ups in excel?

What you are describing is either an InputBox (simple, but not too flexible)
or a userform (very flexible, but you have to set it up and code it all).

The simple version: you can "pop up" an inputbox either when the book
opens, or when the user clicks into a particular cell, or when they press a
commandbutton. The difference is where you put the code (more on that later).

Code would be simple:
Dim UserInput as Variant
UserInput = InputBox("Enter the value he")
' Now you need to store the value in your book or do your calculations...

To run it on opening the book: Go into the VB editor and show the project
explorer, double-click on "ThisWorkbook" to select it, and put the code in as:
Private Sub Workbook_Open()
....
End Sub

To run it on entering a cell: Select the appropriate worksheet in project
explorer and then:
Private Sub Workbook_SelectionChange(Target as Range)
If Not(Intersect(Target, YourCell) Is Nothing Then ' this checks if the new
selection "overlaps" your cell
....
End If
End Sub

For the commandbutton, just right-click on it, choose "Assign macro...",
press the New button, and type the code in the resulting CommandButton_Click
procedure.

You can also (from VB editor) choose Insert.... UserForm and design your own
customized pop-up, but the instructions would be longer than I can give here.
Look up Userforms in Help and search this site if you are interested.
HTH


"Larry Sartoris" wrote:

I'm trying to make a pop up and then have the user enter data into the pop
up. Then use that data to make calculations in the excel sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How do I create pop ups in excel?

Thanks so much you've been a great help in short amount of time.

That would have taken me forever to figure out. Again thank you both...

Larry

"Chip Pearson" wrote:

If you name a macro Auto_Open, it will automatically execute when
the sheet is opened. E.g.,

Sub Auto_Open()
Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Larry Sartoris" <Larry wrote
in message
...
Ok I'll try to use an inputbox. I work better with examples do
you think you
could give me a small example of using an input box when an
excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote
in message
...
I'm trying to make a pop up and then have the user enter
data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How do I create pop ups in excel?

Ok I got another good question. Is there a way to make a pop box with a drop
down menu?

"Larry Sartoris" wrote:

Thanks so much you've been a great help in short amount of time.

That would have taken me forever to figure out. Again thank you both...

Larry

"Chip Pearson" wrote:

If you name a macro Auto_Open, it will automatically execute when
the sheet is opened. E.g.,

Sub Auto_Open()
Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Larry Sartoris" <Larry wrote
in message
...
Ok I'll try to use an inputbox. I work better with examples do
you think you
could give me a small example of using an input box when an
excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote
in message
...
I'm trying to make a pop up and then have the user enter
data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default How do I create pop ups in excel?

You can creat "forms" in code and than include
"Listboxes" or "ComboBoxes"

Each of these contain a list of items to choose from.

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in message
...
Ok I got another good question. Is there a way to make a pop box with a
drop
down menu?

"Larry Sartoris" wrote:

Thanks so much you've been a great help in short amount of time.

That would have taken me forever to figure out. Again thank you both...

Larry

"Chip Pearson" wrote:

If you name a macro Auto_Open, it will automatically execute when
the sheet is opened. E.g.,

Sub Auto_Open()
Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Larry Sartoris" <Larry wrote
in message
...
Ok I'll try to use an inputbox. I work better with examples do
you think you
could give me a small example of using an input box when an
excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote
in message
...
I'm trying to make a pop up and then have the user enter
data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.








  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How do I create pop ups in excel?

Could you give me an example please?
inside of an inputbox
Select a fruit:
Apple, peach, pear

"STEVE BELL" wrote:

You can creat "forms" in code and than include
"Listboxes" or "ComboBoxes"

Each of these contain a list of items to choose from.

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in message
...
Ok I got another good question. Is there a way to make a pop box with a
drop
down menu?

"Larry Sartoris" wrote:

Thanks so much you've been a great help in short amount of time.

That would have taken me forever to figure out. Again thank you both...

Larry

"Chip Pearson" wrote:

If you name a macro Auto_Open, it will automatically execute when
the sheet is opened. E.g.,

Sub Auto_Open()
Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Larry Sartoris" <Larry wrote
in message
...
Ok I'll try to use an inputbox. I work better with examples do
you think you
could give me a small example of using an input box when an
excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote
in message
...
I'm trying to make a pop up and then have the user enter
data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.











  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default How do I create pop ups in excel?

Send me your email and I'll send you an example workbook

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in message
...
Could you give me an example please?
inside of an inputbox
Select a fruit:
Apple, peach, pear

"STEVE BELL" wrote:

You can creat "forms" in code and than include
"Listboxes" or "ComboBoxes"

Each of these contain a list of items to choose from.

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in
message
...
Ok I got another good question. Is there a way to make a pop box with
a
drop
down menu?

"Larry Sartoris" wrote:

Thanks so much you've been a great help in short amount of time.

That would have taken me forever to figure out. Again thank you
both...

Larry

"Chip Pearson" wrote:

If you name a macro Auto_Open, it will automatically execute when
the sheet is opened. E.g.,

Sub Auto_Open()
Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Larry Sartoris" <Larry wrote
in message
...
Ok I'll try to use an inputbox. I work better with examples do
you think you
could give me a small example of using an input box when an
excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote
in message
...
I'm trying to make a pop up and then have the user enter
data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.











  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How do I create pop ups in excel?



"STEVE BELL" wrote:

Send me your email and I'll send you an example workbook

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in message
...
Could you give me an example please?
inside of an inputbox
Select a fruit:
Apple, peach, pear

"STEVE BELL" wrote:

You can creat "forms" in code and than include
"Listboxes" or "ComboBoxes"

Each of these contain a list of items to choose from.

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in
message
...
Ok I got another good question. Is there a way to make a pop box with
a
drop
down menu?

"Larry Sartoris" wrote:

Thanks so much you've been a great help in short amount of time.

That would have taken me forever to figure out. Again thank you
both...

Larry

"Chip Pearson" wrote:

If you name a macro Auto_Open, it will automatically execute when
the sheet is opened. E.g.,

Sub Auto_Open()
Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Larry Sartoris" <Larry wrote
in message
...
Ok I'll try to use an inputbox. I work better with examples do
you think you
could give me a small example of using an input box when an
excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote
in message
...
I'm trying to make a pop up and then have the user enter
data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.












  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default How do I create pop ups in excel?

Check your email.

The workbook has code in it...

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in message
...


"STEVE BELL" wrote:

Send me your email and I'll send you an example workbook

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in
message
...
Could you give me an example please?
inside of an inputbox
Select a fruit:
Apple, peach, pear

"STEVE BELL" wrote:

You can creat "forms" in code and than include
"Listboxes" or "ComboBoxes"

Each of these contain a list of items to choose from.

--
steveB

Remove "AYN" from email to respond
"Larry Sartoris" wrote in
message
...
Ok I got another good question. Is there a way to make a pop box
with
a
drop
down menu?

"Larry Sartoris" wrote:

Thanks so much you've been a great help in short amount of time.

That would have taken me forever to figure out. Again thank you
both...

Larry

"Chip Pearson" wrote:

If you name a macro Auto_Open, it will automatically execute when
the sheet is opened. E.g.,

Sub Auto_Open()
Dim S As String
S = InputBox("Enter Something")
If StrPtr(S) < 0 Then
Range("A1").Value = S
Else
' user clicked cancel
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Larry Sartoris" <Larry wrote
in message
...
Ok I'll try to use an inputbox. I work better with examples do
you think you
could give me a small example of using an input box when an
excel sheet is
opened? Thanks

"Chip Pearson" wrote:

The easiest way is to use an InputBox.

Dim S As String
S = InputBox("Enter Something")
Range("A1").Value = S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Sartoris" <Larry
wrote
in message
...
I'm trying to make a pop up and then have the user enter
data
into the pop
up. Then use that data to make calculations in the excel
sheet. Too
complicated for excel?

Let me know if I confused you at all

Thanks for any help.














  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I create pop ups in excel?


Is it possible I could get a copy of the workbook with the "InputBox"
with the drop down? That is 100% what I'm looking for right now.



Thanks.

Joel


--
jojotherider
------------------------------------------------------------------------
jojotherider's Profile:
http://www.excelforum.com/member.php...o&userid=24548
View this thread: http://www.excelforum.com/showthread...hreadid=378640

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a macro to create excel line graph with coloured pointers anddata lables anuj datta Charts and Charting in Excel 1 September 30th 09 04:04 PM
How to create adress list so can mail merge and create labels? adecocq Excel Discussion (Misc queries) 2 October 25th 06 12:32 AM
how to create a combo box in excel - how to create the drop down . @evy Excel Discussion (Misc queries) 2 August 18th 06 12:17 PM
How to create a form to insert a hyerlink.VBA code to create a for karthi Excel Discussion (Misc queries) 0 July 5th 06 11:26 AM
Create dictionary of terms, create first time user site Solitaire Jane Austin New Users to Excel 1 January 19th 06 09:47 PM


All times are GMT +1. The time now is 01:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"