oakwood_001
Board Regular
- Joined
- Apr 4, 2008
- Messages
- 108
Morning All,
I have a procedure that was working perfectly yesterday. I've not changed it and yet today it doesn't seem to be working.
I keep getting a 'Runtime Error '13', Type Mismatch' debug error. Can you help?
Any help, much appreciated. Driving me crazy
I have a procedure that was working perfectly yesterday. I've not changed it and yet today it doesn't seem to be working.
I keep getting a 'Runtime Error '13', Type Mismatch' debug error. Can you help?
Code:
Public intRowCount As Integer
Sub mcrCopyDataNewSheet()
Dim strRawDataBook As String
Dim strNewBook As String
Dim strRawDataRange As String
intRowCount = Range(Range("B5"), Range("B5").End(xlDown)).Count
strRawDataBook = ActiveWorkbook.Name
strRawDataRange = Application.InputBox(Prompt:="Please enter the Raw Data Range beginning with Earliest Start on Sunday and ending with the Saturday Rota:", Default:="L:AR", Type:=8)
Range(strRawDataRange).Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Range("1:1").Delete
strNewBook = ActiveWorkbook.Name
Workbooks(strRawDataBook).Activate
Range(Range("B5"), Range("B5").End(xlDown)).Copy
Workbooks(strNewBook).Activate
Range("AK4").Select
Selection.PasteSpecial Paste:=xlValues
End Sub
Any help, much appreciated. Driving me crazy