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: 39
Default Trouble with Declaring Worksheets

Hi again.... I seem to keep having trouble declaring controls or worksheets
with the set command!
Here is my sample code, the Set iSheet Line errors-Object required '424',
what am I doing wrong?
the Activecell.offset(0,1).text is "Audits", which is a Worksheet.
Also how is my code... am I heading in the right direction... or can it be
tightened up a bit!

Thank... once again Craig

Private Sub Verify_Code_Click()
Dim iSheet As Worksheet
Dim iRange As Range
shVerification.Unprotect
Application.ScreenUpdating = False
If shVerification.Range("B1").Value = "Pass" Then
Audits.Range("B5").Value = "Yes"
ElseIf shVerification.Range("B1").Value = "Fail" Then
Audits.Range("B5").Value = "No"
shVerification.Activate
shVerification.Range("B3").Select
For x = 1 To 200
If ActiveCell.Value = 1 Then
Set iSheet = ActiveCell.Offset(0, 1).Text 'THIS IS
WHERE MY ERROR STARTS
Set iRange = ActiveCell.Offset(0, 2).Text
iSheet.Activate
iSheet.Range(iRange).Select
Set iSheet = Nothing
Set iRange = Nothing
Exit For
Else
ActiveCell.Offset(1, 0).Select
End If
Next x
End If
shVerification.Protect
Application.ScreenUpdating = True
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
Declaring variables for use in multiple worksheets tompl Excel Discussion (Misc queries) 0 April 8th 10 04:40 PM
Trouble copying worksheets between books - is there size limit? kris2u Excel Worksheet Functions 2 October 13th 05 08:44 PM
declaring a certain value thephoenix12[_4_] Excel Programming 2 June 28th 05 02:31 PM
Trouble with Dates between 2 seperate worksheets Julie Excel Discussion (Misc queries) 3 March 4th 05 07:57 PM
Trouble with Averaging across several worksheets Fysh Excel Worksheet Functions 7 December 2nd 04 02:36 AM


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

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"