C
Casey
Great Gurus of VBA,
I use the following Code to copy information from dozens of identica
worksheets to a master log. The information is transfered from on
worksheet at at time to the master log. The code has been working fin
until I added protection to the Master Log and so had to add code o
the sheets to unlock the Master Log prior to pasting the data and the
re-locking the master Log. Below is my code. Sorry for all the notes
but I still learning.
The code stops on the line:
Selection.PasteSpecial Paste:xlPlasteValues.........................
With the following Error:
Run-time error '1004'
PasteSpecial method of Range class failed
You guys have helped me so much, I hate to ask for something else, bu
could you explain the error I've made as well as show me how to fi
it.
CODE:
Private Sub SendRFItoLog_Click()
'
' ExportFiguresFromRFI_to_RFILOG Macro
' Macro recorded 1/7/2004 by Casey Wilkins
'
'
Application.ScreenUpdating = False
Range("B1:G1").Copy
Sheets("Master RFI Log").Select
Sheets("Master RFI Log").Unprotect ("geekk")
Sheets("Master RFI Log").Range("A5").Select
'The Activate next blank down makes sure
'the information goes into
'a blank row.
Call ActivateNextBlankDown
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False
'The cost event sorter puts all the information
'in order based on RFI #
Call CostEvent_Sorter
'This code makes the selection of the entire sheet go away
'and selects cell C8
Sheets("Master RFI Log").Range("B6").Select
Sheets("Master RFI Log").Protect ("geekk")
DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.ScreenUpdating = True
End Su
I use the following Code to copy information from dozens of identica
worksheets to a master log. The information is transfered from on
worksheet at at time to the master log. The code has been working fin
until I added protection to the Master Log and so had to add code o
the sheets to unlock the Master Log prior to pasting the data and the
re-locking the master Log. Below is my code. Sorry for all the notes
but I still learning.
The code stops on the line:
Selection.PasteSpecial Paste:xlPlasteValues.........................
With the following Error:
Run-time error '1004'
PasteSpecial method of Range class failed
You guys have helped me so much, I hate to ask for something else, bu
could you explain the error I've made as well as show me how to fi
it.
CODE:
Private Sub SendRFItoLog_Click()
'
' ExportFiguresFromRFI_to_RFILOG Macro
' Macro recorded 1/7/2004 by Casey Wilkins
'
'
Application.ScreenUpdating = False
Range("B1:G1").Copy
Sheets("Master RFI Log").Select
Sheets("Master RFI Log").Unprotect ("geekk")
Sheets("Master RFI Log").Range("A5").Select
'The Activate next blank down makes sure
'the information goes into
'a blank row.
Call ActivateNextBlankDown
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False
'The cost event sorter puts all the information
'in order based on RFI #
Call CostEvent_Sorter
'This code makes the selection of the entire sheet go away
'and selects cell C8
Sheets("Master RFI Log").Range("B6").Select
Sheets("Master RFI Log").Protect ("geekk")
DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.ScreenUpdating = True
End Su