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: 345
Default Object range method runtime error

In my application there are values i want to place in consistently
named cells. The location of these cells can vary by row.
They must appear after the row which has a row number of endmanifrow.

my "developing" code is below.

Things were going fine until i got to the "method" I really
wanted, "try #3" when I got the runtime error.

I suppose I can build a string variable to hold the E6 value,
(try#2) from the endmanifrow and trackcol values,
but I'd prefer not to.

In the module's declarations:
tpdmanif is dim'd as worksheet.
zzbranchstdT is dim'd as object
Any suggestions on how to implement the try#3 method? Thanks.
Neal Z


Sub e_develop()

Call n_AJC_TPD_Common_Values ''' holds the sheet names

If UCase(ActiveSheet.name) < ajc_sheetname And _
UCase(ActiveSheet.name) < tpd_sheetname And ActiveSheet.name <
"Sheet1" Then
MsgBox ActiveSheet.name & " IS INVALID"
Exit Sub
End If

Call zfind_endofmanifest(1, endmanifrow, "test")
If endmanifrow = 0 Then Exit Sub
Call zfind_trackcol(endmanifrow, 4, 50, trackcol, "test")
If trackcol = 0 Then Exit Sub

Set tpdmanif = Sheets(tpd_sheetname)
Set tpdmanif = Sheets("Sheet1") '''test

''' Set zzbranchstdT = tpdmanif.range("E6") ''' try #1, this worked

''' Dim cell: cell = "E6" ''' try#2 lines worked, but not what I
really want
''' Set zzbranchstdT = tpdmanif.range(cell)

''' try #3 THIS IS WHAT I WANT BUT AM GETTING RUNTIME ERROR, METHOD RANGE
OF OBJECT FAILED
Dim cell: cell = "Cells(endmanifrow + 1, trackcol)"
Set zzbranchstdT = tpdmanif.range(cell) ''' THIS IS THE LINE THAT ERROR'D
OUT

''' Set zzrowT = tpdmanif.range(Cells(endmanifrow + 2, trackcol))
''' Set postitT = tpdmanif.range(Cells(endmanifrow + 3, trackcol))

zzbranchstdT = 811 ''' TEST LOADING THE CELL, worked for trys 1 and 2


End Sub
--
Neal Z
 
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
runtime error 434, object does not support this method or property Janis Excel Discussion (Misc queries) 4 January 17th 08 04:10 PM
Runtime 1004 error -- insert method of range class failed. tish Excel Discussion (Misc queries) 1 June 1st 07 04:04 PM
runtime error 1004 method range of object '_global failed valdesd Excel Discussion (Misc queries) 2 October 6th 05 07:26 PM
Runtime Error 1004 - Method Range of '_Global failed' Sworkhard Excel Programming 3 July 9th 04 04:20 AM
runtime error '1004' delete Method of Range Class Failed Tom Ogilvy Excel Programming 0 April 1st 04 04:09 AM


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