Try recording a macro.
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?
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.
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
make sure you don't tell Excel to disable macros when you open the sheet!
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?
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
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.
Like this thread? Share it with others