Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Declaring variables for use in multiple worksheets | Excel Discussion (Misc queries) | |||
Trouble copying worksheets between books - is there size limit? | Excel Worksheet Functions | |||
declaring a certain value | Excel Programming | |||
Trouble with Dates between 2 seperate worksheets | Excel Discussion (Misc queries) | |||
Trouble with Averaging across several worksheets | Excel Worksheet Functions |