N
Nev
Hi there
With help from community I have a great macro. Trouble is that this section
will run in its own workbook but not when its in Personal.xls
Sub Copy_to_new_Workbook()
Dim SourceRange As Range
Dim DestRange As Range
Dim DestWB As Workbook
Dim DestSh As Worksheet
Dim Lr As Long
Macro then runs fine until after the option to save from here on
Application.Dialogs(xlDialogSaveAs).Show
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
'Change the file name (2*) and the path/file name to your file
If bIsBookOpen_RB("Master Copy.xls") Then
Set DestWB = Workbooks("Master Copy.xls")
Else
Set DestWB = Workbooks.Open("c:\block management\Master Copy.xls")
End If
'Change the Source Sheet and range
Set SourceRange = ThisWorkbook.Sheets("addresses").Range("b1:t500")
'Change the sheet name of the database workbook
Set DestSh = DestWB.Worksheets("addresses")
Set DestRange = DestSh.Range("b1:t500")
On Error Resume Next
For Each wks In Worksheets
wks.Unprotect Password:="nev"
Next wks
Then it works OK. It just will not copy the data from Source to Destination
sheets
Can anyone out there help? I have 80 workbooks to run from Personal!
Thanks in advance
Nev
With help from community I have a great macro. Trouble is that this section
will run in its own workbook but not when its in Personal.xls
Sub Copy_to_new_Workbook()
Dim SourceRange As Range
Dim DestRange As Range
Dim DestWB As Workbook
Dim DestSh As Worksheet
Dim Lr As Long
Macro then runs fine until after the option to save from here on
Application.Dialogs(xlDialogSaveAs).Show
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
'Change the file name (2*) and the path/file name to your file
If bIsBookOpen_RB("Master Copy.xls") Then
Set DestWB = Workbooks("Master Copy.xls")
Else
Set DestWB = Workbooks.Open("c:\block management\Master Copy.xls")
End If
'Change the Source Sheet and range
Set SourceRange = ThisWorkbook.Sheets("addresses").Range("b1:t500")
'Change the sheet name of the database workbook
Set DestSh = DestWB.Worksheets("addresses")
Set DestRange = DestSh.Range("b1:t500")
On Error Resume Next
For Each wks In Worksheets
wks.Unprotect Password:="nev"
Next wks
Then it works OK. It just will not copy the data from Source to Destination
sheets
Can anyone out there help? I have 80 workbooks to run from Personal!
Thanks in advance
Nev