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: 1
Default Method 'Range' of Object_Worksheet Failed

Hi,

I'm amazed that I've been able to get as far as I am with the cod
below, but now I am stuck on something. I keep getting a Run time erro
on this line:


Code
-------------------
WS2.Range("Rng" & k).Value = "NA
-------------------


It states that the Method 'Range' of Object_Worksheet failed. Here i
my complete procedu


Code
-------------------

Public Sub CommandButton4_Click()

Dim WS1 As Worksheet, WS2 As Worksheet
Dim Rng As Range
i As Integer
j As Integer
k As Integer

Set WS1 = Sheets("Step 1")
Set WS2 = Sheets("Step 2")
Set Rng1 = WS2.Range("C11, J11, C27, J27")
Set Rng2 = WS2.Range("D11, K11, D27, K27")
Set Rng3 = WS2.Range("E11, L11, E27, L27")
Set Rng4 = WS2.Range("F11, M11, F27, M27")
Set Rng5 = WS2.Range("G11, N11, G27, N27")

For i = 1 To 29
If WS2.OLEObjects("CheckBoxSpecies" & i).Object.Value = True Then
For j = 1 To 5
If WS1.OLEObjects("CheckBoxBedrockL" & j).Object.Value = False _ Then
For k = 1 To 5
WS2.Range("Rng" & k).Value = "NA"
Next
End If
Next
End If
Next

End Su
-------------------


Is there an easy workaround for this problem?

Thanks to anyone out there who can hel

--
Message posted from http://www.ExcelForum.com

 
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
Autofill method of range class failed Don Guillett Excel Discussion (Misc queries) 0 February 27th 08 03:56 PM
Autofill method of range class failed Appache Excel Discussion (Misc queries) 5 February 27th 08 03:37 PM
Error: method 'select' of object_worksheet' failed Carl Excel Discussion (Misc queries) 4 September 9th 06 08:52 PM
Insert method of range class failed quartz[_2_] Excel Programming 0 August 17th 04 07:31 PM
AutoFit method of Range class failed Wellie[_2_] Excel Programming 1 February 29th 04 02:06 PM


All times are GMT +1. The time now is 05:09 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"