Consulting

Results 1 to 20 of 21

Thread: macro change cell color - opens original template (unintended)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Dec 2015
    Posts
    15
    Location

    macro change cell color - opens original template (unintended)

    I created a template for a workschedule. In that template I made a macro, that changes the background color of selected cells. (user selected cells).
    The user is supposed to save the template as a regular excel workbook with activated macros.
    So far so good. When using the "colorchange macro", the cells change color correct, BUT at the same time my original template opens as well.
    The template has other macros in it as well.
    So, how do i prevent the template to open, as I only want the active workbook to be affected by my macro?

    Here's the code Ive used:

    Sub fillcolorblue()
        Selection.Interior.Color = RGB(204, 204, 255)
    End Sub
    Last edited by Aussiebear; 06-15-2025 at 01:40 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •