T
TJ Buthe
I am trying to create a macro (in Excel XP/2002) that
copies cells to a new location deletes last column of the
old info and then returns the user to a new blank column.
I can get that much. What I would like it to do after
that is to display an inputbox so that the user is
prompted to enter the current month and year and then
have the information they enter as the header for the new
column. This will always be cell F6. I can get the
InputBox to display but don't know how to get Excel to
put the info the user types into cell F6. This is
probably remedial for you guys, I know but I would really
appreciate any help and can hopefully learn from it.
Here's what I have so far:
ActiveSheet.Unprotect
Columns("F:L").Select
Selection.Copy
Columns("G:M").Select
ActiveSheet.Paste
Columns("M:M").Select
Selection.Delete Shift:=xlToLeft
Range("F5:F6").Select
Selection.ClearContents
Columns("F:F").Select
Selection.ClearContents
Range("F5").Select
InputBox ("Enter the Month and Year, such as Mar 04")
Also, does anyone have book or reference they would
suggest to help me learn VB? I am a beginner so anything
would help. Thanks.
copies cells to a new location deletes last column of the
old info and then returns the user to a new blank column.
I can get that much. What I would like it to do after
that is to display an inputbox so that the user is
prompted to enter the current month and year and then
have the information they enter as the header for the new
column. This will always be cell F6. I can get the
InputBox to display but don't know how to get Excel to
put the info the user types into cell F6. This is
probably remedial for you guys, I know but I would really
appreciate any help and can hopefully learn from it.
Here's what I have so far:
ActiveSheet.Unprotect
Columns("F:L").Select
Selection.Copy
Columns("G:M").Select
ActiveSheet.Paste
Columns("M:M").Select
Selection.Delete Shift:=xlToLeft
Range("F5:F6").Select
Selection.ClearContents
Columns("F:F").Select
Selection.ClearContents
Range("F5").Select
InputBox ("Enter the Month and Year, such as Mar 04")
Also, does anyone have book or reference they would
suggest to help me learn VB? I am a beginner so anything
would help. Thanks.