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: 92
Default What is wrong with this code?

Can someone tell me what is wrong with this code. I am getting an object required error. Thanks.

Sub TestStuff()
Dim MBT As String
Dim fc As OLEObject
Dim t As Integer

If ActiveSheet.Name = "TIME AND LEAVE" Then
For Each fc In OLEObjects
If TypeOf fc.Object Is MSForms.Checkbox Then
t = CInt(Mid$(fc.Name, 9))
With ActiveSheet
For t = 2 To 30
If ActiveSheet.Range("Cell" & t).Value < "" Then
ActiveSheet.OLEObjects("CheckBox" & t).Visible = False
Else
ActiveSheet.OLEObjects("CheckBox" & t).Visible = True
End If
Next
End With
End If
Next fc
End If
End Sub
 
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
What is wrong with this code? Ayo Excel Discussion (Misc queries) 14 June 10th 08 03:09 AM
What is wrong with this code? jlclyde Excel Discussion (Misc queries) 5 January 9th 08 05:12 PM
What is wrong with the code? Eric Excel Discussion (Misc queries) 2 September 13th 07 10:36 AM
What's wrong with my code ? christophe meresse Excel Worksheet Functions 3 August 2nd 05 05:09 PM
Is something wrong with the code Patrick Molloy[_3_] Excel Programming 1 July 15th 03 08:28 AM


All times are GMT +1. The time now is 06:41 AM.

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"