+ Reply to Thread
Results 1 to 7 of 7

How to activate the Button as Activecell?

Hybrid View

AdiK How to activate the Button as... 11-04-2016, 07:15 AM
zbor Re: How to activate the... 11-04-2016, 07:22 AM
AdiK Re: How to activate the... 11-04-2016, 08:30 AM
zbor Re: How to activate the... 11-04-2016, 08:40 AM
AdiK Re: How to activate the... 11-04-2016, 08:47 AM
AdiK Re: How to activate the... 11-04-2016, 10:19 AM
zbor Re: How to activate the... 11-04-2016, 10:32 AM
  1. #1
    Registered User
    Join Date
    10-25-2016
    Location
    mumbai
    MS-Off Ver
    2010
    Posts
    47

    How to activate the Button as Activecell?

    Hello Guys,
    I would like to know if there is any way to make the cell in which the button is inserted as the ActiveCell when i click the button?
    Thanks in advance

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,032

    Re: How to activate the Button as Activecell?

    Do you mean:

    Sub test()
    Dim ac As Range
    Set ac = Range(ActiveCell.Address)
    
    End Sub
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    10-25-2016
    Location
    mumbai
    MS-Off Ver
    2010
    Posts
    47

    Re: How to activate the Button as Activecell?

    Unbenannt.jpg

    Hi zbor,

    Thanks for the quick reply. In the image u can see that there are three buttons. I want that, when i click any of these buttons, the cell in which the button is inserted should become the activecell. Loking forward for your guidance

    Thanks in Advance

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,032

    Re: How to activate the Button as Activecell?

    Ah, I see.

    Assign this macro to a button:

    Sub btn_position()
    Dim btn As Object
    Set btn = ActiveSheet.Buttons(Application.Caller)
     
    With btn.TopLeftCell
       adr = .Address
    End With
    
    msgbox adr
    
    End Sub

  5. #5
    Registered User
    Join Date
    10-25-2016
    Location
    mumbai
    MS-Off Ver
    2010
    Posts
    47

    Re: How to activate the Button as Activecell?

    Perfect!

    Thanks a lott

  6. #6
    Registered User
    Join Date
    10-25-2016
    Location
    mumbai
    MS-Off Ver
    2010
    Posts
    47

    Re: How to activate the Button as Activecell?

    Hi zbor,

    I have another similar question. When i use the Application.inputbox(), i select a value on the excel sheet. I want the selected cell to be the Activecell cell now. Is there a way to do it?

    Thanks in Advance

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,032

    Re: How to activate the Button as Activecell?

    This is a new question, not so simillar
    Please open a new thread

+ 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. Returning Activecell when pressing a button
    By gvaltat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2014, 02:40 PM
  2. [SOLVED] Move Button To ActiveCell
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-20-2014, 11:24 AM
  3. Set Button as ActiveCell
    By gvaltat in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-02-2014, 02:43 PM
  4. How to activate a past activecell
    By PunPryde in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-28-2011, 12:55 PM
  5. ActiveCell.Activate
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2009, 05:19 PM
  6. ActiveCell and command button help
    By clownfish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2009, 02:19 PM
  7. [SOLVED] how to know be button in activecell
    By x taol in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2006, 09:55 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