INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Simple Range-Select Method Producing Error

Simple Range-Select Method Producing Error

(OP)
I have a macro which crashes with the error statement “Application Defined or Object Defined” error '1004" after a simple Range("A2").Select statement.
In desperation I tried:
With Sheets("MT 2010")
.Range("A2").Select
End With
with the same result.
I've tried putting that section of the code in it's own macro and it works just fine. It seems that there is nothing I can do within this particular macro to select a cell in this worksheet. I have several other places in the macro where I use the code, but it won't do it in this particular location. I even tried making it the first statements in the macro and it crashed, yet it works fine in its own macro. I've wasted a ton of time with this and am now contemplating becoming an alcoholic. What's the deal?

RE: Simple Range-Select Method Producing Error

Dunno. We haven;'t really got enough information, since it is clear from what you say that this is only part of your code.

RE: Simple Range-Select Method Producing Error

Hi,

1) Is sheet MT 2010 active when this statement executes? I'd guess not.

2) Do you really need to Select that cell on that sheet? There is lots of good stuff that you can do to cells without selecting them or having them in the active sheet or even in an active workbook, as long as they are properly referenced in your code.

However, the Select method can only be performed in an ActiveSheet.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close