Hi everyone,
I have a workbook used for invoices and estimates.
Each time I save a estimate i.e click button on template sheet, a new sheet must be created with cell value as sheet name. My code is as follow, which works perfectly:
My problem comes in when I add an "E" before the cell value in E3 (which is the estimate number).
I assume split function will need to be used? I have no experience with it.
Thank you in advance.
I have a workbook used for invoices and estimates.
Each time I save a estimate i.e click button on template sheet, a new sheet must be created with cell value as sheet name. My code is as follow, which works perfectly:
VBA Code:
Sub Rectangle1_Click()
Dim ws As Worksheet
Set wh = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wh.Range("e3").Value <> "" Then
ActiveSheet.Name = wh.Range("e3").Value
End If
wh.Activate
With Sheets("Estimate").Range("e3")
.Value = .Value + 1
End With
End Sub
My problem comes in when I add an "E" before the cell value in E3 (which is the estimate number).
I assume split function will need to be used? I have no experience with it.
Thank you in advance.