+ Reply to Thread
Results 1 to 4 of 4

Store RGB(x, y, z) As Variable

  1. #1
    Registered User
    Join Date
    03-05-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Store RGB(x, y, z) As Variable

    Hello,

    I have a sub procedure that uses a color as an argument (ie RGB(0, 0, 0)), and then colors the selected cells:

    Please Login or Register  to view this content.
    I am given a mismatch error. I know it's possible to store shadeColor As Integer and then use 123456 as a color, but I was hoping I could use RGB instead as it makes more sense.

    Thanks

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Store RGB(x, y, z) As Variable

    The RGB function returns a Long, not a String.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Store RGB(x, y, z) As Variable

    I do not understand - RGB is Long value:
    Please Login or Register  to view this content.
    call by:
    Please Login or Register  to view this content.
    for example.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  4. #4
    Registered User
    Join Date
    03-05-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Store RGB(x, y, z) As Variable

    Thanks!

    that was a silly question, wasn't it

+ 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. How to store the return value from cmd to a variable?
    By jonelamora in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-08-2012, 10:21 PM
  2. Variable to store last row more than once.
    By bopsgtir in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-04-2012, 04:56 PM
  3. [SOLVED] Store variable in worksheet and use that variable in VBA code
    By ExcelGal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2012, 08:20 AM
  4. Store name as variable
    By james.90 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-18-2008, 12:22 AM
  5. store variable
    By keen learner in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-08-2006, 10:30 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