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: 9
Default Compile error

Hello. I have the following code here and it is giving me problems

Private Sub CommandButton3_Click()
Dim i As Long, j As Long
Dim rng1 As Range, rng2 As Range
Dim rng3 As Range, rng3a As Range
Dim rng4 As Range, rng4a As Range


Set rng1 = Sheet3.Range("D91")
Set rng2 = Sheet1.Range("A98") ' "29 120"
Set rng3 = Sheet3.Range("B91")
Set rng3a = Sheet1.Range("C98:D98")
Set rng4 = Sheet3.Range("C91")
Set rng4a = Sheet1.Range("E98:F98")
For j = 1 To 4
Set cbox = Me.Controls("ComboBox" & j)
For i = LBound(Jobs) To UBound(Jobs)
If Jobs(i) = cbox.Value Then
rng1.Offset(i, 0) = Jobs(i)
rng2.Value = "29 120"
rng3.Offset(i, 0).Value = Application.Sum(rng3a)
rng4.Offset(i, 0).Value = Application.Sum(rng4a)
End If
Next i, j


When I try to compile it, it gives me the error message "Compile
Error" "Method or data member not Found," with "Private Sub
CommandButton3_Click()" and "Me.Controls" highlited.

This is a continuation from before with an array "Jobs" of about 22
members in this array already created in a previous Sub command.

I have looked all over and have found no help on this subject. I hope
someone else can help!!

 
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
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
error message: compile error, argument not optional Pierre via OfficeKB.com Excel Programming 3 September 5th 05 03:45 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 07:42 PM.

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

About Us

"It's about Microsoft Excel"