I would like to only copy the values and the formating to the new workbook and worksheet. My code currently copies everything and all of the formulas so when the new workbooks are emailed out they show errors because the link is broken. I tried a few different methods but have been unsucessful, any thoughts?
Thanks for your sugesstions and help in advance....
Current Code:
Dim wbThis As Workbook
Dim wbNew As Workbook
Dim ws As Worksheet
Dim strFileName As String
Dim path As String
Dim name As String
Application.ScreenUpdating = False
path = "G:\Student Services\"
Set wbThis = ActiveWorkbook
For Each ws In wbThis.Worksheets
strFileName = "Drop Analysis " & ws.Cells(1, 105).Text & ".xlsx"
name = ws.Cells(1, 105)
If Dir(name) <> "" Then GoTo Blank
ws.Copy
Application.DisplayAlerts = False
Set wbNew = ActiveWorkbook
wbNew.SaveAs Filename:=(path & strFileName)
wbNew.Close
Blank:
Next ws
End Sub
Thanks for your sugesstions and help in advance....
Current Code:
Dim wbThis As Workbook
Dim wbNew As Workbook
Dim ws As Worksheet
Dim strFileName As String
Dim path As String
Dim name As String
Application.ScreenUpdating = False
path = "G:\Student Services\"
Set wbThis = ActiveWorkbook
For Each ws In wbThis.Worksheets
strFileName = "Drop Analysis " & ws.Cells(1, 105).Text & ".xlsx"
name = ws.Cells(1, 105)
If Dir(name) <> "" Then GoTo Blank
ws.Copy
Application.DisplayAlerts = False
Set wbNew = ActiveWorkbook
wbNew.SaveAs Filename:=(path & strFileName)
wbNew.Close
Blank:
Next ws
End Sub