+ Reply to Thread
Results 1 to 5 of 5

VBA Code to enable Design Mode, use a hyperlink to another tab, and disable Design Mode

  1. #1
    Forum Contributor
    Join Date
    02-14-2011
    Location
    West Valley City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    108

    VBA Code to enable Design Mode, use a hyperlink to another tab, and disable Design Mode

    Good afternoon all,

    I'm looking for a way to insert a hyperlink in a cell that was text, and when the text is clicked, it enables Design Mode, the hyperlink works its magic, and then Design Mode is disabled, all with one click.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Code to enable Design Mode, use a hyperlink to another tab, and disable Design Mod

    Unless I misunderstand your intent, you wouldn't have to specifically enter\exit design mode from VBA. It can add hyperlink directly to a cell.

    I don't follow exactly what hyperlink you want to add. Could you give an example of what text is within the cell and the destination you want to hyperlink to.

    Excel Hyperlinks and Hyperlink Function

  3. #3
    Forum Contributor
    Join Date
    02-14-2011
    Location
    West Valley City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: VBA Code to enable Design Mode, use a hyperlink to another tab, and disable Design Mod

    Well, what i've got going is VBA code that hides/unhides rows for each sheet when the sheet is activated, and I'd like to be able to take a hyperlink to Sheet2, copy some content, then take a hyperlink back to sheet 1 (which without design mode would hide/unhide rows and thus cancel the copying), so I can paste the copied content.

    To further elaborate, i've got a section of cells that is hidden/unhidden based off the value of another cell (lets say A1 has the value, and if A1 = 1, Row 2 is unhidden, and 3-10 are hidden, if A1 = 2, rows 2 and 3 are unhidden, and rows 4-10 are hidden, etc). I want to be able to click a hyperlink that says "Sheet2", go to that sheet, copy content from that sheet, then have a hyperlink that would turn Design mode on (so the rows are no longer hiding/unhiding), function as a hyperlink so I'd be on sheet1, then take Design mode off.
    Last edited by Sky188; 06-05-2013 at 05:18 PM.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Code to enable Design Mode, use a hyperlink to another tab, and disable Design Mod

    VBA doesn't require a sheet to be activated to either copy or pates to it.

    You don't want a hyperlink. You want to automatically run a macro when a specific cell is selected. That macro can copy from one sheet to another without having to use hyperlinks, or enter\exit edit mode, or activating any sheets.

    Can you give specifics; what cell do you click on, what content do you want to copy, where do you want it pasted?

  5. #5
    Forum Contributor
    Join Date
    02-14-2011
    Location
    West Valley City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: VBA Code to enable Design Mode, use a hyperlink to another tab, and disable Design Mod

    With regards to specifics:
    I have a sheet called "Price Schedule" which is a compilation of products that are selected on a previous sheet, and space for certain service agreements (the templates for these are on another sheet, "Rise and Fall""; I dont want to have a macro that automatically puts stuff into a cell because there are multiple templates on the Rise and Fall sheet that the user can choose from. My ultimate goal is to allow them to change sheet, copy whichever template they want, go back to the Price Schedule sheet, and paste it into whichever area they want.

    Im not looking for VBA to copy or paste anything. I just want it to Enable Design mode, use a hyperlink (or change sheet, either would work), and then disable Design Mode.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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