Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#15
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I create pop ups in excel?
Is it possible for me to have a copy of "inputbox" as well. On top of that, can I retrieve the searched result into a combo bo next to the input box?? Please advise... Thanks in advance. YJ -- YJ ----------------------------------------------------------------------- YJL's Profile: http://www.excelforum.com/member.php...fo&userid=2869 View this thread: http://www.excelforum.com/showthread.php?threadid=37864 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a macro to create excel line graph with coloured pointers anddata lables | Charts and Charting in Excel | |||
How to create adress list so can mail merge and create labels? | Excel Discussion (Misc queries) | |||
how to create a combo box in excel - how to create the drop down . | Excel Discussion (Misc queries) | |||
How to create a form to insert a hyerlink.VBA code to create a for | Excel Discussion (Misc queries) | |||
Create dictionary of terms, create first time user site | New Users to Excel |