Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an order form that I have created on an Excel spreadsheet and
would like to insert some code that would have a window pop up to prompt the user for their name, address and voicemail box #. I would like the pop up to occur each time the document is opened. I am not very familiar with VB but I found this code (see below- I already modified it for my document- cell reference, and text) but don't know where to put it in the script and how to set it up so that it runs each time the form gets opened. Also not sure as to where to put the < symbols. Sub getvalue() Range("B3").Value = InputBox("Enter your Name") Next Range("D3").Value = InputBox("Enter your Shipping Address") Next Range("H3").Value = InputBox("Enter your Voicemail Box #") End Sub Additionally, if my Excel document already contains some data validation lists will that create a problem and if so whats the best way to fix it. My knowledge on VB is pretty lacking...Any help would be greatly appreciated! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put this code in the ThisWorkbook page. Should do what you're looking
for. I would suggest you look into user forms for getting all 3 values on one popup box (see http://j-walk.com/ss/excel/tips/userformtips.htm for help). Sub getvalue() Range("B3").Value = InputBox("Enter your Name") Range("D3").Value = InputBox("Enter your Shipping Address") Range("H3").Value = InputBox("Enter your Voicemail Box #") End Sub Private Sub Workbook_Open() Call getvalue End Sub HRgal wrote: I have an order form that I have created on an Excel spreadsheet and would like to insert some code that would have a window pop up to prompt the user for their name, address and voicemail box #. I would like the pop up to occur each time the document is opened. I am not very familiar with VB but I found this code (see below- I already modified it for my document- cell reference, and text) but don't know where to put it in the script and how to set it up so that it runs each time the form gets opened. Also not sure as to where to put the < symbols. Sub getvalue() Range("B3").Value = InputBox("Enter your Name") Next Range("D3").Value = InputBox("Enter your Shipping Address") Next Range("H3").Value = InputBox("Enter your Voicemail Box #") End Sub Additionally, if my Excel document already contains some data validation lists will that create a problem and if so whats the best way to fix it. My knowledge on VB is pretty lacking...Any help would be greatly appreciated! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So I have put the information into a user form...do I still need to
utilize the code then? Sorry, this is all very foreign to me...but I guess the only way to learn is to try it! Where is the This Workbook page? John Fuller wrote: Put this code in the ThisWorkbook page. Should do what you're looking for. I would suggest you look into user forms for getting all 3 values on one popup box (see http://j-walk.com/ss/excel/tips/userformtips.htm for help). Sub getvalue() Range("B3").Value = InputBox("Enter your Name") Range("D3").Value = InputBox("Enter your Shipping Address") Range("H3").Value = InputBox("Enter your Voicemail Box #") End Sub Private Sub Workbook_Open() Call getvalue End Sub HRgal wrote: I have an order form that I have created on an Excel spreadsheet and would like to insert some code that would have a window pop up to prompt the user for their name, address and voicemail box #. I would like the pop up to occur each time the document is opened. I am not very familiar with VB but I found this code (see below- I already modified it for my document- cell reference, and text) but don't know where to put it in the script and how to set it up so that it runs each time the form gets opened. Also not sure as to where to put the < symbols. Sub getvalue() Range("B3").Value = InputBox("Enter your Name") Next Range("D3").Value = InputBox("Enter your Shipping Address") Next Range("H3").Value = InputBox("Enter your Voicemail Box #") End Sub Additionally, if my Excel document already contains some data validation lists will that create a problem and if so whats the best way to fix it. My knowledge on VB is pretty lacking...Any help would be greatly appreciated! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prompt message when opening a file | Excel Worksheet Functions | |||
Prompt Message when opening a file | Excel Worksheet Functions | |||
auto prompt file insert object when opening a template | Excel Programming | |||
XL VB noobie needs help - macro opening file already in use prompt | Excel Programming | |||
Dialog prompt during opening of file | New Users to Excel |