+ Reply to Thread
Results 1 to 3 of 3

Pop up window prompt for name/address upon opening of file

  1. #1
    HRgal
    Guest

    Pop up window prompt for name/address upon opening of file

    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. #2
    John Fuller
    Guest

    Re: Pop up window prompt for name/address upon opening of file

    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. #3
    HRgal
    Guest

    Re: Pop up window prompt for name/address upon opening of file

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1