This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
5
“Worksheets” property not working?
Post Flair (click to view more posts with a particular flair)
Post Body
VBA newbie here but I’m working on my first project.
For some reason the line:
Worksheets(“sheet1”).Range(“C7:C20”).select
Isn’t working. I get a run-time error saying subscript out of range.
Meanwhile if I change it to:
Sheet1.Range(“C7:C20”).select
It works fine.
Am I misunderstanding something? I randomly tried the sheet1 method whereas Wise Owl tutorials have taught me to use worksheets(“sheet1”), but that isn’t working.
Any help is much appreciated!
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/vba/comment...