+ Reply to Thread
Results 1 to 6 of 6

Open input box when a worksheet is selected

  1. #1
    Registered User
    Join Date
    07-10-2018
    Location
    Uk
    MS-Off Ver
    MS365 Version 2102
    Posts
    86

    Open input box when a worksheet is selected

    Hi,

    Just wondering if anybody can help with my problem:

    I would like an input box to open only when a certain worksheet is selected and then for that input box to put the value into cell E3

    Thanks for any help

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Open input box when a worksheet is selected


    Hi !

    Within the worksheet module just use its Worksheet_Activate event …

  3. #3
    Registered User
    Join Date
    07-10-2018
    Location
    Uk
    MS-Off Ver
    MS365 Version 2102
    Posts
    86

    Re: Open input box when a worksheet is selected

    Thanks ive tried this but icant seem to get it to work? Getting "expected End sub error"

    Private Sub Worksheet_Activate()
    Sub InputBox_Example()

    Dim i As Variant

    i = InputBox("Please Enter Your Name", "Personal Information", "Type Here")

    Range("E3").Value = i
    End Sub

    End Sub

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,791

    Re: Open input box when a worksheet is selected

    It should be
    Please Login or Register  to view this content.
    Also please edit your post to put code tags around your code. The # icon in the reply/edit window

  5. #5
    Registered User
    Join Date
    07-10-2018
    Location
    Uk
    MS-Off Ver
    MS365 Version 2102
    Posts
    86

    Re: Open input box when a worksheet is selected

    Ok that works fine thanks for your help, Sorry about not putting code tags around my code

    I have one final question in my input box I would like the [Default] value to be that of cell E3 is that possible?

    Thanks

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,791

    Re: Open input box when a worksheet is selected

    Use
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 56
    Last Post: 09-08-2014, 06:54 AM
  2. Replies: 1
    Last Post: 07-23-2014, 12:13 PM
  3. Hide all worksheet except 5 input sheets and a 6th sheet selected in a drop down list
    By brianfarrell06 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-15-2014, 10:21 AM
  4. Replies: 2
    Last Post: 12-06-2012, 05:52 PM
  5. [SOLVED] Import worksheet from user selected file into open workbook
    By AWM1966 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-14-2012, 04:30 PM
  6. using vba to open worksheet and validate user input in real time
    By RossKennedy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2011, 01:58 PM
  7. Replies: 0
    Last Post: 06-29-2005, 06:05 PM

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