+ Reply to Thread
Results 1 to 6 of 6

VBA Buttons!

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    15

    VBA Buttons!

    Hello all,
    I need help creating the following buttons:

    1. A button that clears specific Cells when clicked.
    2. A button that pastes from the clipboard to a predetermined set of cells.

    I realize this is as uncomplicated a request as they come, but I'm new to this and am just now getting my feet wet.

  2. #2
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: VBA Buttons!

    you'll need to specify the cells that you target for those operations..

    also, include the name of sheet you will do those operations..
    don't worry, there's a lot of people that are far more confused than you
    but if you liked what i suggested. Click for me the "Add Reputation" - that way, we'd be both happy.

  3. #3
    Registered User
    Join Date
    07-29-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: VBA Buttons!

    Quote Originally Posted by ag273n View Post
    you'll need to specify the cells that you target for those operations..

    also, include the name of sheet you will do those operations..
    Here we go!

    Clear all...
    E4-E300, H4:M102, M2, O4

    Paste...
    E4-E300

    Now, I'm thinking that I would need a Clear Button for E4-E300 also.

    "Billing" is the name of the sheet...
    Last edited by Msimm14; 07-30-2013 at 09:04 PM. Reason: Didn't listen...

  4. #4
    Registered User
    Join Date
    07-29-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: VBA Buttons!

    Got it to work. Thanks!

  5. #5
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: VBA Buttons!

    you'll need to add a button
    go to developer tab (if its not showing, google it.. thats pretty easy)

    click "insert"
    under the active X controls - click command button

    your mouse will look like a plus sign, just click and drag in a diagonal direction across the cells
    once you have a button, right click on it then select "properties"
    then change the caption , type there "Clear All"

    then double click the button you created

    then paste this on the sheet that will appear

    (this is assuming that the range you will clear doesnt change)
    (erase everything in there before pasting this)

    Please Login or Register  to view this content.

    *now assuming you already coppied the stuff you wanna paste

    go again to the developer tab and create a new button
    click insert
    then under the active X controls - click command button
    and like the previous step, just click and drag across the sheet so you can make a button
    then the same, just right click on the button and click properties,
    then change caption to "Paste"

    then doubleclick the button you just created again.. then paste this (just below the code you pasted earlier)


    Please Login or Register  to view this content.

    in your developer tab, you'll see at the top that the "Design Mode" is highlighted, click it just once to disable it.. so you can use your new buttons now

  6. #6
    Registered User
    Join Date
    07-29-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: VBA Buttons!

    Thanks a million!!

+ 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. How to insert and user of Buttons, Radio buttons, check boxes in excel sheet.
    By krishco in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2013, 02:52 AM
  2. How to insert Buttons, radio buttons and check boxes in Excel
    By krishco in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2013, 08:13 AM
  3. How can I insert multiple sets of option buttons (radio buttons) in Excel 2010?
    By mickwooduclan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2013, 10:01 AM
  4. Mix up of buttons in Excel Add-In ribbon - how to delete buttons?
    By lausianne in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-11-2013, 08:51 AM
  5. Replies: 2
    Last Post: 07-10-2005, 04:05 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