Hi,

I have a macro that takes an Excel table and copies it into a blank workbook as values. What I need to do is have it only copy columns that have a check box checked. My VBA knowledge is extremely limited (but I'm working on it!), so any help would be greatly appreciated. Below is my existing macro. It was made primarily from recording a macro.

Sub Generate_Upload_File()
'
' Generate_Upload_File Macro
'

'
    Range("Raw_Inv[[#Headers],[Condition]:[Lookup]]").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Workbooks.Add
    Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
        Columns("AC:AC").Select
    Selection.Cut
    Columns("A:A").Select
    Selection.Insert Shift:=xlToRight
    Range("N2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.NumberFormat = "m/d/yyyy"
    Columns("A:AC").Select
    Columns("A:AC").EntireColumn.AutoFit
    Range("A1").Select
    Dim fname
fname = Application.GetSaveAsFilename(InitialFileName:="Inventory Upload", FileFilter:=" (*.CSV), *.CSV", Title:="Save As")
If fname = False Then Exit Sub
ActiveWorkbook.SaveAs Filename:=fname
    
End Sub
My plan is to have check boxes above each table column on row 4 (my table starts on row 5).

Thanks for your help!