I'm at the end of my long process of VBA learning/Macro building. I am organizing the way my Macros work and in attempt at changing the look, layout and operation I've decided it would be best to have all my Macros stay in a locked workbook, but all my results return on a brand new workbook.
I suppose to start I need to create a macro that opens a new workbook and makes the users save it straight away. That's easy.
But the question is: what do I need to include in my code for the macro to return the results on my newly created workbook?
below is the first step in my macro code:
Thank you VBA pros
I suppose to start I need to create a macro that opens a new workbook and makes the users save it straight away. That's easy.
But the question is: what do I need to include in my code for the macro to return the results on my newly created workbook?
below is the first step in my macro code:
Code:
Sub Step1()
'this sub determines Airway Bill, sorting the AWB based on length
ActiveWorkbook.Sheets("HazShipper").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim mycell As Range
For Each mycell In Range("E2", Range("E" & Rows.Count).End(xlUp))
If Len(mycell) = 14 Then mycell.Offset(, 16).Value = Right(mycell.Value, 8)
If Len(mycell) = 21 Then mycell.Offset(, 16).Value = "UPS"
If Len(mycell) = 22 Then mycell.Offset(, 16).Value = "UPS"
If Len(mycell) <= 7 Then mycell.Offset(, 16).Value = "Analyze"
If Len(mycell) = 9 Then mycell.Offset(, 16).Value = "Unknown"
If Len(mycell) >= 23 Then mycell.Offset(, 16).Value = "Analyze"
Next mycell
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
Thank you VBA pros