Is it possible to make macro that clear Shape and skip TextBox ?
There is my code, but I get all deleted.
Thank you
Sub SacuvajPonuduExcel()
Dim shp As Shape
path = "C:\Users\Bojan\Documents\Ponuda\Excel\"
radninalog = Range("C10")
klijent = Range("G2")
dt_issue = Range("B11")
fname = radninalog & " - " & klijent
Application.DisplayAlerts = False
Sheet1.Copy
For Each shp In ActiveSheet.Shapes
If shp.Type <> msoPicture Then shp.Delete
Next shp
With ActiveWorkbook
.Sheets(1).Name = "Ponuda"
.SaveAs Filename:=path & fname, FileFormat:=51
.Close
End With
Application.DisplayAlerts = True
Set nextrec = Sheet2.Range("A1048576").End(xlUp).Offset(1, 0)
nextrec = radninalog
nextrec.Offset(0, 1) = klijent
nextrec.Offset(0, 2) = dt_issue
Sheet2.Hyperlinks.Add anchor:=nextrec.Offset(0, 6), Address:=path & fname & ".xlsx"
End Sub
There is my code, but I get all deleted.
Thank you
Sub SacuvajPonuduExcel()
Dim shp As Shape
path = "C:\Users\Bojan\Documents\Ponuda\Excel\"
radninalog = Range("C10")
klijent = Range("G2")
dt_issue = Range("B11")
fname = radninalog & " - " & klijent
Application.DisplayAlerts = False
Sheet1.Copy
For Each shp In ActiveSheet.Shapes
If shp.Type <> msoPicture Then shp.Delete
Next shp
With ActiveWorkbook
.Sheets(1).Name = "Ponuda"
.SaveAs Filename:=path & fname, FileFormat:=51
.Close
End With
Application.DisplayAlerts = True
Set nextrec = Sheet2.Range("A1048576").End(xlUp).Offset(1, 0)
nextrec = radninalog
nextrec.Offset(0, 1) = klijent
nextrec.Offset(0, 2) = dt_issue
Sheet2.Hyperlinks.Add anchor:=nextrec.Offset(0, 6), Address:=path & fname & ".xlsx"
End Sub