Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

problem with colorpicker

  Asked By: Bailey    Date: Mar 09    Category: MS Office    Views: 564
  

I am building a complicated userform for a macro that will color user-
defined shapes according to the value of associated cells (mapping
numerical data on user-drawn regional maps). I want to include a set
of 10 controls for color (which will correspond with increments (1-10,
11-20, etc), and am currently testing its applicability by having it
generate an array of rgb values, and applying it to a range of cells,
but I get a object-defined error...Any suggestions

*GetAColor returns the .rgb value for the backcolor of the button
selected by the user, the backcolor of the buttons is populated from
the sheet's color palette.

Dim n as Integer
Dim UserColor() as Long
For n = 1 To 10
UserColor(n) = GetAColor()
ActiveSheet.Range(Cells(1, n)).Interior.Color.rgb = UserColor(n)

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on problem with colorpicker Or get search suggestion and latest updates.




Tagged: