[mso] Re: Excel 2002 Macro Help

Thanks Linda, I did turn toggle to relative, my problem was
it was relative to which cell was active, I need to make
sure it went to A1 on each sheet.  Also, I tried Wilson's
code, couldn't get it to work, I have to look at it again,
which will probably be Friday before I can get back to it at
work, tomorrow other stuff has to get done.

Christine

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx
[mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf Of Linda F.
Johnson
Sent: Wednesday, April 28, 2004 7:27 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Excel 2002 Macro Help


I know Wilson probably gave you the code you wanted,
Christine....but since you are recording macros to learn how
they look in code (which is the best way to learn them I'm
told, and I do it too)...I wanted to remind you that on your
macro recorder toolbar, there's a button to change the macro
between absolute and relative.  If the macro is relative, it
will insert the column to the left of whatever cell you are
in when you run it....however, if the macro is absolute, it
will always go to column B when you run it.  Don't forget
that button is there :-)=20


Linda
Linda's Computer Stop
http://personal-computer-tutor.com
ABC Free Ezine ~ Free Ebooks and Tutorials
*all outgoing mail scanned by Norton AV.  If you got a bug
that looks like it came from me, it did NOT!

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx
[mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf Of McDonald,
Christine, Ms, DCAA
Sent: Wednesday, April 28, 2004 7:16 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Excel 2002 Macro Help

Hi all, I'm working on a complex macro to perform a  number
of tasks that I need to do to compare some data.  One of the
things I need it to do, is go to the specified worksheet,
and insert a column to the left of Column A.  This is what I
have so far: Sheets("Previous PP").Select
    ActiveCell.Columns("A:A").EntireColumn.Select
    Selection.Insert Shift:=3DxlToRight

What it is doing however, is inserting the column to the
left of whatever cell the cursor happens to be in.  So I
added an additional line so this portion of the macro looks
like this now:
=20
    Sheets("Previous PP").Select
     Range("A1").Select
    ActiveCell.Columns("A:A").EntireColumn.Select
    Selection.Insert Shift:=3DxlToRight

Is this the best way to do this?  I realize my macro is
probably not written the most efficient way, but I started
with recording the macro, since I'm new to this, and
modifying it to meet my needs and to be more efficient as I
learn more.

Thanks,

Christine McDonald


************************************************************
*
You are receiving this mail because you subscribed to
mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to
mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to=20
mso-request@xxxxxxxxxxxxx with the word "unsubscribe"
(without the quotes) in the subject line.

Or, visit the group's homepage and use the dropdown menu.
This will also allow you to change your email settings to
digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with
the group, send a request to mso-moderators@xxxxxxxxxxxxx
and you will be sent an invitation with instructions.  Once
you are a member of the files group, you can go here to
upload/download files:
http://www.smartgroups.com/vault/msofiles
************************************************************
*


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: