+ Reply to Thread
Results 1 to 4 of 4

Create Command Button to Copy Cell Value and Open a URL

  1. #1
    Registered User
    Join Date
    02-12-2014
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2016
    Posts
    6

    Create Command Button to Copy Cell Value and Open a URL

    I need to create a button that will do the following, depending on a simple formula:
    A. if FALSE: Copy the value of a cell to the clipboard
    B. if TRUE: Copy the value of a cell to the clipboard AND open a URL in the default browser window

    This will need to work on Excel on a PC or Mac

    I was able to copy to clipboard using this VBA:
    Sub RectangleRoundedCorners2_Click()
    Range("C16:D16").Copy
    End Sub

    Please help!

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Create Command Button to Copy Cell Value and Open a URL

    A. if FALSE: Copy the value of a cell to the clipboard
    curious to know why copy the data to memory, if you're not going to do anything with it?

    B. if TRUE: Copy the value of a cell to the clipboard AND open a URL in the default browser window
    Are you planning to have a URL link within a cell, then use a button to execute a hyperlink?

    Please clarify

  3. #3
    Registered User
    Join Date
    02-12-2014
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: Create Command Button to Copy Cell Value and Open a URL

    If the formula is false, the user is copying the value to clipboard to paste it into another application

    If the formula is true, the user is copy the value to clipboard to paste it into the webpage I am hoping to direct them to with the URL

    I am trying to make it as automated as possible to reduce if not eliminate user error

  4. #4
    Registered User
    Join Date
    02-12-2014
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: Create Command Button to Copy Cell Value and Open a URL

    I have a followup to my earlier question if anyone can help me out.

    Similar worksheet, but the requirements have changed a little bit.

    I have a worksheet with data input by another user in to 3 designated cells. In a 4th cell, I am using a simple concatenation formula to build a URL.

    Once that data is input, I want the user to push a command button that will:
    1. Copy the URL from the 4th cell
    2. Go to that website
    3. Return the data from that website and paste it in a 5th cell

    Any ideas on how this might be possible? I think there is a similar function in Google sheets call IMPORTDATA.

+ 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] Test for file open from Command Button on userform - not displaying open already message
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2017, 09:45 AM
  2. VBA code to create command button. Print all sheets then delete command button.
    By Declamatory in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2015, 05:18 PM
  3. Copy Check Box to Every 5th Cell with Command Button
    By und3raxi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-13-2015, 03:01 AM
  4. Command button to open Save As dialogue box for new spreadsheet and copy data.
    By valhallaone in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-20-2013, 07:08 PM
  5. Create a command button with code with a command button
    By jakara in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2013, 01:28 PM
  6. command button- open folder and copy data from .csv file
    By karo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2012, 08:17 AM
  7. Replies: 0
    Last Post: 11-03-2005, 11:00 AM

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