I would like a VBA code that can do the following; In my active workbook 'Service…
Jump to turn (6)
- 1I would like a VBA code that can do the following; In my active workbook 'Servic
- 2I forgot to mention that I do not want any formulas to be copied across, just th
- 3When the sheet is copied from workbook
- 4When the sheet is copied from the workbook 'Service Provider' to the workbook 'S
- 5In the new sheet that was created, how do I clear the contents and all the form
- 6I am getting the rror 'Cant assign to read-only property' on this line of code h
- User
I would like a VBA code that can do the following;
In my active workbook 'Service Providers' when I run module22, part of the code (shown below) checks if the sheet from where I have run the module, exists in an opened workbook 'Service Providers History'. If the sheet does not exist in workbook 'Service Providers History' , a new sheet is created with the same name from where module22 was run in workbook 'Service Providers' . Here is part of the code in Module22 that executes the above description:
Dim sourceWB As Workbook Dim sourceWS As Worksheet Dim historyWB As Workbook Dim historyWS As Worksheet Dim lastRow As Long Dim pasteRow As Long
code' Set source workbook and worksheet Set sourceWB = ActiveWorkbook Set sourceWS = sourceWB.ActiveSheet' If the sheet doesn't exist, create a new sheet with the same name If historyWS Is Nothing Then sourceWS.Copy After:=historyWB.Sheets(historyWB.Sheets.Count) Set historyWS = historyWB.ActiveSheet historyWS.Name = sourceWS.Name End If