+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    4

    Link both format and values from one worksheet to another.

    I am currently needing to link both the values and formats of cells from one worksheet to another. I don't think i can use conditional formatting, I have several cells that need to be blue, and others that need to be black. These cells will change from blue to black after they are approved. I have one sheet that is for working with (has several formats, to make it easy to find what is needed) and the other is to be clean and neat for printing. I was needing to have the color in the cells change on the clean sheet as the colors change on the working sheet. Is there a way I can do this through VBA? I also need to password protect the clean sheet.

  2. #2
    Registered User
    Join Date
    06-05-2009
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Link both format and values from one worksheet to another.

    Ok sorry guys, I think I found out how to make a Macro that will do that, I was hoping i could put something in automatically that would make it change, but as of now I guess I can just rerun the macro each time i need an update. But if anyone knows a better idea of how to link them together to have changes appear automatically that would be even better, and I'd love to know.

    thanks!

  3. #3
    Forum Guru davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2007
    Posts
    1,879

    Re: Link both format and values from one worksheet to another.

    You could put your macro in on of the Workbook events. For example, if you put it in the before save event, before saving it will run the macro updating your values and formats. Hope that helps.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  4. #4
    Registered User
    Join Date
    06-05-2009
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Link both format and values from one worksheet to another.

    How do you get to events? Haven't used that before.

  5. #5
    Forum Guru davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2007
    Posts
    1,879

    Re: Link both format and values from one worksheet to another.

    In the Visual Basic Editor, first double click the "ThisWorkbook" Microsoft Excel Object under the VBAProject file structure on the left. Then there are two combo boxes on top of where you put the code in. Change the one that says "(General)" to Workbook. Then the other usually flips to "Open". Change it to whichever event you want. For this purpose I suggest BeforeSave. It will run the macro any time you save, before the save process, so the changes will be saved.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

Thread Information

Users Browsing this Thread

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

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.2.0