Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2007

Tip: Looking for answers? Try searching our database.

adding column to workbook with macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 06 Nov 2007 15:53 GMT
If I add a column to an existing workbook/sheets...do I have to recreate
existing macros in that workbook..or will they 'auto-adjust' to the new
column inserted ?

The existing macros work on various columns with different functions

Thanks, Tim
Gary''s Student - 06 Nov 2007 16:16 GMT
Say C1 contains "hello"

running:

Sub test()
MsgBox (Range("C1").Value)
End Sub

will echo that contents

If you add a column at the beginning of the worksheet, the macro will not
adjust.

Running the macro will no longer greet you. (But there is a way around this)
Signature

Gary''s Student - gsnu2007a

> If I add a column to an existing workbook/sheets...do I have to recreate
> existing macros in that workbook..or will they 'auto-adjust' to the new
[quoted text clipped - 3 lines]
>
> Thanks, Tim
Earl Kiosterud - 07 Nov 2007 03:11 GMT
Tim,

Macro cell references don't adjust as do formula cell references.  You can use range names
in your macros instead of hard cell references.  The references for those names will adjust.
Insert - Name - Define (or just type a name into the name box).
Signature

Regards from Virginia Beach,

Earl Kiosterud
www.smokeylake.com

   Note: Top-posting has been the norm here.
   Some folks prefer bottom-posting.
   But if you bottom-post to a reply that's
   already top-posted, the thread gets messy.
   When in Rome...
-----------------------------------------------------------------------

> If I add a column to an existing workbook/sheets...do I have to recreate existing macros
> in that workbook..or will they 'auto-adjust' to the new column inserted ?
>
> The existing macros work on various columns with different functions
>
> Thanks, Tim

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.