Engineer Joe
Well-known Member
- Joined
- Jun 10, 2005
- Messages
- 549
I have two Problems:
1. In my code, I search for ranges containing identifying text and label them (BodyStart and BodyEnd) like this.
Then I try to name all of the cells between BodyStart and BodyEnd. I've selected the name BodyEntire. Like this...
But with the above line of code, i always get the dreaded error 1004 - Method 'range' of object '_global' failed.
Am I naming the range incorrectly?
2. Also, shouldn't the " r " in range be automatically capitalized for all of this crap? I don't know why " r " is not capitalized, but that isn't disturbing the program, because it works everywhere else with the lower case...
1. In my code, I search for ranges containing identifying text and label them (BodyStart and BodyEnd) like this.
Code:
Set BodyStart = Cells.Find(what:="General", searchorder:=xlByRows, searchformat:=False)
Then I try to name all of the cells between BodyStart and BodyEnd. I've selected the name BodyEntire. Like this...
Code:
Set BodyEntire = range(range("BodyStart"), range("BodyEnd"))
But with the above line of code, i always get the dreaded error 1004 - Method 'range' of object '_global' failed.
Am I naming the range incorrectly?
2. Also, shouldn't the " r " in range be automatically capitalized for all of this crap? I don't know why " r " is not capitalized, but that isn't disturbing the program, because it works everywhere else with the lower case...