abba92
12-20-2006, 01:17 PM
Hello!
I'm working in Excel 2003 and have created a macro. This macro is supposed to do a few different functions; unhide some columns, hide some columns as well as copy the contents of a range of cells in a workbook and paste the fomulas into the same range of cells in a different worksheet.
Everything works fine except the formulas don't actually paste into the second worksheet. I've unprotected it, just in case that was the issue, but it wasn't.
The code is below:
Sub CasepackStyle()
'
' CasepackStyle Macro
' Macro recorded 12/20/2006 by xxx
'
'
ActiveWorkbook.Unprotect Password:="3581479"
ActiveSheet.Unprotect Password:="3581479"
Columns("CJ: DK").Select (had to add a space or I got a smiley)
Selection.EntireColumn.Hidden = False
Range("H35").Select
Sheets("Master StyleColor").Visible = True
Range("H35:AB448").Select
Selection.Copy
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("StyleColor 1 Order by Size").Select
Range("H35:AB448").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("G36").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("Master StyleColor").Select
ActiveWindow.SelectedSheets.Visible = False
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("StyleColor 1 Order by Size").Select
Range("E36").Select
ActiveSheet.Protect Password:="3581479"
ActiveWorkbook.Protect Password:="3581479"
End Sub
Thanks for any help! :bug:
I'm working in Excel 2003 and have created a macro. This macro is supposed to do a few different functions; unhide some columns, hide some columns as well as copy the contents of a range of cells in a workbook and paste the fomulas into the same range of cells in a different worksheet.
Everything works fine except the formulas don't actually paste into the second worksheet. I've unprotected it, just in case that was the issue, but it wasn't.
The code is below:
Sub CasepackStyle()
'
' CasepackStyle Macro
' Macro recorded 12/20/2006 by xxx
'
'
ActiveWorkbook.Unprotect Password:="3581479"
ActiveSheet.Unprotect Password:="3581479"
Columns("CJ: DK").Select (had to add a space or I got a smiley)
Selection.EntireColumn.Hidden = False
Range("H35").Select
Sheets("Master StyleColor").Visible = True
Range("H35:AB448").Select
Selection.Copy
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("StyleColor 1 Order by Size").Select
Range("H35:AB448").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("G36").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("Master StyleColor").Select
ActiveWindow.SelectedSheets.Visible = False
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("StyleColor 1 Order by Size").Select
Range("E36").Select
ActiveSheet.Protect Password:="3581479"
ActiveWorkbook.Protect Password:="3581479"
End Sub
Thanks for any help! :bug: