[mso] Excel 2002 Macro Help
- From: "McDonald, Christine, Ms, DCAA" <Christine.McDonald@xxxxxxxx>
- To: <mso@xxxxxxxxxxxxx>
- Date: Wed, 28 Apr 2004 18:16:27 -0500
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:=xlToRight
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:
Sheets("Previous PP").Select
Range("A1").Select
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.Insert Shift:=xlToRight
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
Technical Specialist
Western Regional Office
*************************************************************
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
*************************************************************
- Follow-Ups:
- [mso] Re: Excel 2002 Macro Help
- From: Wilson Baptista Junior
- [mso] Re: Excel 2002 Macro Help
- From: Linda F. Johnson
Other related posts:
- » [mso] Excel 2002 Macro Help
- » [mso] Re: Excel 2002 Macro Help
- » [mso] Re: Excel 2002 Macro Help
- » [mso] Re: Excel 2002 Macro Help
- » [mso] Re: Excel 2002 Macro Help
- » [mso] Re: Excel 2002 Macro Help
- » [mso] Re: Excel 2002 Macro Help
- [mso] Re: Excel 2002 Macro Help
- From: Wilson Baptista Junior
- [mso] Re: Excel 2002 Macro Help
- From: Linda F. Johnson