LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Compile Error Method or data member not found

Been using John Walkenbach's Color Pallette code. It was working fine until
I imported the module into a new file. I have been using it in XL2000.
However I am not in XL 2003 and getting a Compile Error.

The line: Function GetAColor() As Variant is highlighted in yellow and the
line: .ColorButton = in the line: Set Buttons(ButtonCount).ColorButton = ctl
is highlighted in grey.

Does this have something to do with XL 2003?

Function GetAColor() As Variant
' Displays a dialog box and returns a
' color value - or False if no color is selected
Dim ctl As Control
Dim ButtonCount As Integer
ButtonCount = 0
For Each ctl In UserForm1.Controls
' The 56 color buttons have their Tag property set to "ColorButton"
If ctl.Tag = "ColorButton" Then
ButtonCount = ButtonCount + 1
Set Buttons(ButtonCount).ColorButton = ctl
If WorkbookIsActive Then
' Get colors from the active workbook's palette
Buttons(ButtonCount).ColorButton.BackColor = _
ActiveWorkbook.Colors(ButtonCount)
Else
' Get colors from this workbook's palette
Buttons(ButtonCount).ColorButton.BackColor = _
ThisWorkbook.Colors(ButtonCount)
End If
End If
Next ctl
UserForm1.Show
GetAColor = ColorValue
End Function
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error: Method or data member not found Brian Day Excel Worksheet Functions 0 July 22nd 07 03:20 AM
Compile Error: Method or data member not found Nick S[_4_] Excel Programming 0 November 16th 04 04:43 PM
Compile Error: Method or data member not found Nick S[_3_] Excel Programming 2 November 16th 04 02:38 PM
Compile Error: Method or data member not found Nick S[_2_] Excel Programming 1 November 16th 04 11:41 AM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 09:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"