I sort of get what you're saying and sort of don't. Because you could mean it probably 2 different ways. And I want to avoid confusing you.
Macros when they are programmed basically read from the top of the code and read to the bottom of the code. And the computer HAS to perform those actions in that order. You can't have the computer performing two or more operations at once. For example, I can't have it pasting data on sheet1 while it is coloring cells on sheet2. It has to do one or the other first. And which one it does first depends on which one is stated first in the code.
Having said that, there are some ways to speed up your code. And there are some ways to group your code to simplify it.
A simple way to speed up your code is to set the ScreenUpdating to false. Basically this avoids updating the screen everytime your macro makes a change. You want to turn the ScreenUpdating back on though at the end of your code so you can see the results of the changes that your macro made. This is great to use for For Next loops or Do While loops where thousands of changes can take place. Instead of making 1,000's of changes to the screen, it only makes one at the end. The other changes just happen in the background in the computer's memory and that happens a lot faster than the screen changes. Here's an example of how you can do it:
Application.ScreenUpdating = False
For x = 1 To 50001
Cells(x, 1).Value = "Hello"
Next x
Application.ScreenUpdating = True
By adding those two screenupdating lines you just eliminated 50,000 screen updates.
As far as grouping your code, you can do that with the Call procedure. You can write your Subs and Functions in a Module and then you can call that Sub in a different Sub. I like to use this for particularly long macros because it allows me to break the macro down into parts and some of those parts I can use multiple times if I want by passing data to them. It can save writing a lot of code that you normally would otherwise have to write.
Private Sub cmdSPI_Click()
'Checks for entries that would cause errors
CheckSPI = False
CheckNoICQ = False
Call SPI.MyChecks
If CheckSPI = True Then Exit Sub
Call SPI.CleaningProcedure
Call SPI.DateSPI
Call SPI.PartNumber
Call SPI.PreservationMethod
Call SPI.Instructions
Call SPI.DimsAndWeights
Call SPI.PackCube
Call SPI.PartNSN
Call SPI.SupplementalNSN
Call SPI.Change2UpperCase
Call SPI.CushionThickness
Call SPI.UnitContainerLevel
Call SPI.SpecialMarking
If CheckNoICQ = False Then
Call SPI.ICQ
End If
Call SPI.QUP
Call SPI.WSF
Call SPI.ContactPreservative
Call SPI.UnitContainer
Call SPI.IntermediateContainer
Call SPI.PreservationMaterial
Call SPI.WrappingMaterial
Call SPI.CushionMaterial
Call SPI.PackA
Call SPI.PackB
Call SPI.CageCode
Call SPI.MinPack
End Sub
Like the example above is a VERY large macro where I combine a bunch of smaller macros to make up the big one. SPI is the name of my module. And the names after the period are the names of the subroutines or each macro in that Module.
Then to save time, I do something even more like this:
Sub PartNSN()
Dim MyPartNSN As String
With frmPackagingCalc.txtPartNSN
MyPartNSN = Mid(.Value, 6, 8)
Call SPI.MyStringEntry(.Value, 16, 7, 15)
Call SPI.MyStringEntry(MyPartNSN, 45, 29, 8)
End With
End Sub
Notice how I used the MyStringEntry subroutine twice? I avoided having to write the entire code for that sub twice by doing that. Instead, all I had to do is pass data to it twice. To give you and Idea of how much extra I would have had to write. Here is the MyStringEntry macro that it calls twice.
Sub MyStringEntry(MyText As String, MyRow As Integer, MyFirstChar As Integer, MyLength As Integer)
Dim A As Integer, b As Integer
Dim MyUpperText As String
Dim MyString(1 To 1000) As String
MyUpperText = StrConv(MyText, vbUpperCase)
For A = 1 To MyLength
If A <= Len(MyUpperText) Then
MyString(A) = Mid(MyUpperText, A, 1)
Else
MyString(A) = ""
End If
Next A
MyFirstChar = MyFirstChar - 1
With Worksheets("CODE")
For b = 1 To MyLength
If MyString(b) = "0" Then
.Cells(MyRow, b + MyFirstChar) = Chr(216)
Else
.Cells(MyRow, b + MyFirstChar) = MyString(b)
End If
Next b
End With
End Sub