I am fairly new to using VBA in Excel but I was wondering is there a way to run multiple codes at the same time?
My goal is to do a few things, First I need to insert a column, then add a column header, then add a formula to the cell beneath and copy the formula for all rows.
so far I have this code to run to input the row and then the header, but it won't work unless i run them each separately. is there a text I need to input to combine them so when I run it it just runs the whole thing at once? Thank you!
Sub AddColumns()
Worksheets(1).Range("AH1").EntireColumn.Insert
End Sub
Sub AddHeader()
Worksheets(1).Range("AH1").Formula = "Group A"
End Sub
Subroutines. Couldn't you just call those subroutines from the main program? VBA might not have the notion of a main, but there isCallfor chainingSubs. Maybe this is what you want.online excel vba coursesand also search Google for what you are trying to accomplish and research how other people accomplish similar task. You can then try to combine your task and when/if you have a problem, ask a specific question on SO.DoEventsto allow another macro to run. VBADoEventsyields execution of your macro, so your computer processor will be able to simultaneously run other tasks and events.