+ Reply to Thread
Results 1 to 5 of 5

How to change cell color from VBA assigned color

  1. #1
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Office 365
    Posts
    163

    How to change cell color from VBA assigned color

    My VBA code is housed in my personal workbook, and one of the things it does is changing cell colors. After I run the VBA, which has a defninite end and does not continuously loop or anything, I can no longer change the cell colors. Is there a way to assign a color using VBA, but still be able to change that cell color after closing the VBA interface? There are no VBA modules in the file that I want to manually change the cell color in.
    Last edited by OpieWinston; 09-01-2017 at 10:40 AM.

  2. #2
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: How to change cell color from VBA assigned color

    can you post some code or a sample excel file?

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

    Re: How to change cell color from VBA assigned color

    Can you post your code from the Personal workbook?

    I can no longer change the cell colors.
    What exactly does that mean; how did the code color the cells? What method are you using to manually change the color? What exactly happens when you try; error, nothing, message?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Office 365
    Posts
    163

    Re: How to change cell color from VBA assigned color

    Here's all my code - the only formatting I can do after it runs is change column width and row height, despite the code not being in a module for that workbook.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Office 365
    Posts
    163

    Re: How to change cell color from VBA assigned color

    Quote Originally Posted by AlphaFrog View Post
    Can you post your code from the Personal workbook?


    What exactly does that mean; how did the code color the cells? What method are you using to manually change the color? What exactly happens when you try; error, nothing, message?
    I defined some colors for certain cells in the VBA code, and when try to edit the cell and choose a specific color, nothing happens. I can change it to the default yellow by clicking the ribbon button, but it will not let me choose a color when looking for a specific color or no color.

    **EDIT**

    Well that's odd. I have to get this report done so I went back to doing it manually, and I'm having the same issues despite not running any VBA code at all. That's not good - time for a restart and hope for the best! Thanks for your time folks...
    Last edited by OpieWinston; 09-01-2017 at 10:40 AM.

+ 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. Change cell format (cell color+font color) based on color of another cell
    By Dedaluss in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2017, 03:27 AM
  2. Change color based on color assigned to another doc.
    By JJ_Rivera in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-03-2015, 05:06 PM
  3. Mouse rolls over to cell will change the tab color, font color and tp bold type
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-20-2013, 10:36 AM
  4. VBA / Macro help needed to change the barchart color based on Cell Color
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2012, 09:15 AM
  5. Replies: 0
    Last Post: 09-26-2012, 01:08 PM
  6. Replies: 3
    Last Post: 07-08-2010, 06:48 PM
  7. Color a cell and a value is automatically assigned to that color.
    By Bossi in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-03-2005, 01:06 AM

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