-
Feb 1st, 2012, 07:49 PM
#1
Thread Starter
New Member
[RESOLVED] vba excel question
Hi, I'm a vba neophyte messing around within a macro, that I did not write, and trying to discern the effect of the following code:
ActiveCell.Offset(1, 0).Range("A1").Select
I understand that
ActiveCell.Offset(1, 0).Select
selects the cell one row below the original active cell, but i'm unclear as to the impact of adding '.Range("A1").Select.' between the offset and select properties. I've run each piece separately with a command button and they appear to do the same thing, namely move the cell highlight down a row.
What am I missing? Also, why would we want to alter range properties when only selecting a single cell?
-
Feb 2nd, 2012, 01:37 AM
#2
Re: vba excel question
Welcome to VBForums
That line should the same as
Code:
ActiveCell.Offset(1, 0).Select
in other words the "Range("A1") in there does nothing!
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Feb 2nd, 2012, 02:14 AM
#3
Thread Starter
New Member
Re: vba excel question
Thanks so much. Any idea why it was placed in there?
-
Feb 2nd, 2012, 02:24 AM
#4
Re: vba excel question
No telling, at least not without knowing the context from which you got that.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Feb 2nd, 2012, 02:50 AM
#5
Thread Starter
New Member
Re: [RESOLVED] vba excel question
thanks. i don't think it was an attempt to do anything too special. i'll have to ask and see his intentions
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|