+ Reply to Thread
Results 1 to 2 of 2

Inputbox macro without CommandButton

  1. #1
    Registered User
    Join Date
    10-21-2016
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    1

    Inputbox macro without CommandButton

    Hello,

    I want to make a macro that pops up an "inputbox" and where i can fill in a number or word in Cel A1.

    With the code below i need a "CommandButton"
    Is it possible to create one withot that button.
    I want to use it in another macro.


    Private Sub CommandButton1_Click()

    Dim myValue As Variant
    myValue = InputBox("Give me some input")
    Range("A1").Value = myValue

    End Sub

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Inputbox macro without CommandButton

    I think it can be done by pasting your code in either "Change Event" or "afterupdate" or anyother suitable events of worksheet.
    Teach me Excel VBA

+ 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. [SOLVED] MACRO: If user clicks cancel in inputbox,then do nothing. Problem with inputbox appearance
    By Tona in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-05-2015, 04:33 AM
  2. Commandbutton in userform to execute code based on a previous commandbutton choice?
    By michaeljoeyeager in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2012, 03:28 PM
  3. ActiveX CommandButton Macro
    By bpix in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2011, 08:36 AM
  4. Macro - Deactivate commandbutton
    By anmck in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-11-2009, 01:35 PM
  5. how do i make a commandbutton run a macro??
    By Shax in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 06-07-2006, 12:20 PM
  6. [SOLVED] macro does not work from commandbutton
    By ellflocko via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2006, 11:45 AM
  7. CommandButton Link to Macro
    By KMassey1976 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2006, 04:30 PM

Tags for this Thread

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