only close the workbook if there are no more tabs left
This commit is contained in:
parent
0f7b5db8b8
commit
da1df9337c
@ -593,9 +593,14 @@ Sub build_price_level(plev As String)
|
|||||||
nws.Name = "Price list"
|
nws.Name = "Price list"
|
||||||
Call paste_pretty(pl, nws, effdate, curr)
|
Call paste_pretty(pl, nws, effdate, curr)
|
||||||
Else
|
Else
|
||||||
'---if the price list has no length, then close
|
'---if the price list has no length, then close the worksheet.
|
||||||
nwb.Close
|
'---if it's the last worksheet, then close the whole workbook
|
||||||
Exit Sub
|
If nwb.Sheets.Count = 1 Then
|
||||||
|
Call nwb.Close(False)
|
||||||
|
Exit Sub
|
||||||
|
Else
|
||||||
|
nws.Delete
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Application.ScreenUpdating = True
|
Application.ScreenUpdating = True
|
||||||
|
Loading…
Reference in New Issue
Block a user