![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 4
|
I would like to make a command button that will insert a column in another excel sheet within the same workbook and add certain information. Can this be done?
|
|
|
|
|
|
#2 |
|
Join Date: Feb 2002
Posts: 39
|
Try recording a macro.
|
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Posts: 4
|
I'm new at recording macro's and writing any sort of VBA code. Everytime I try to do anything with a macro it says the macros in this project are disabled and to find help on how to enable the macros. It wasn't helpful at all on how to enable macros. any information you can provide would be great. Thanks.
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Location: Sarasota, FL
Posts: 1,539
|
Insert a button, then put this code in the button:
Columns("A:A").Select Selection.Insert Shift:=xlToRight Range("A1").Select Of course, replace A:A with where you want the row to be inserted. Do you need to tell it every time a different place to insert the row? HTH -Corticus |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Location: Sarasota, FL
Posts: 1,539
|
make sure you don't tell Excel to disable macros when you open the sheet!
|
|
|
|
|
|
#6 |
|
New Member
Join Date: May 2002
Posts: 4
|
Thanks for the info
yes, I guess the columns would have to be inserted after the last column with information. how would i incorporate that into the macro. also how do i not tell it to disable macros everytime i open the sheet up if macros was never enabled? |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Apr 2002
Location: Sarasota, FL
Posts: 1,539
|
go to Tools-Macro-Security and lower your security setting, as far as inserting to column at the end, I would like to know myself!
Corticus |
|
|
|
|
|
#8 |
|
New Member
Join Date: May 2002
Posts: 4
|
I tried the macro security setting and the same message pops up
"The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros." and the title of that little pop up msgbox is from Visual Basic. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|