Hello Excell Guru's,
I want to make a text input box that asks for the columns of MFG, PN, Description, Quantity and reference designator, and then renames the headers accordingly. I am then selecting those particular columns and doing other things with them. I'm having to rename the columns manually at the moment and thought having an input box would be very cool. Thanks in advance!
ActiveSheet.Select
MFG = WorksheetFunction.Match("MFG", Rows("1:1"), 0)
PN = WorksheetFunction.Match("PN", Rows("1:1"), 0)
DESC = WorksheetFunction.Match("DESC", Rows("1:1"), 0)
QTY = WorksheetFunction.Match("QTY", Rows("1:1"), 0)
POS = WorksheetFunction.Match("REF", Rows("1:1"), 0)
ActiveSheet.Columns(MFG).Copy Destination:=Sheets("MIKE_BOM").Range("A1")
ActiveSheet.Columns(PN).Copy Destination:=Sheets("MIKE_BOM").Range("B1")
ActiveSheet.Columns(DESC).Copy Destination:=Sheets("MIKE_BOM").Range("C1")
ActiveSheet.Columns(QTY).Copy Destination:=Sheets("MIKE_BOM").Range("D1")
ActiveSheet.Columns(POS).Copy Destination:=Sheets("MIKE_BOM").Range("E1")
I want to make a text input box that asks for the columns of MFG, PN, Description, Quantity and reference designator, and then renames the headers accordingly. I am then selecting those particular columns and doing other things with them. I'm having to rename the columns manually at the moment and thought having an input box would be very cool. Thanks in advance!
ActiveSheet.Select
MFG = WorksheetFunction.Match("MFG", Rows("1:1"), 0)
PN = WorksheetFunction.Match("PN", Rows("1:1"), 0)
DESC = WorksheetFunction.Match("DESC", Rows("1:1"), 0)
QTY = WorksheetFunction.Match("QTY", Rows("1:1"), 0)
POS = WorksheetFunction.Match("REF", Rows("1:1"), 0)
ActiveSheet.Columns(MFG).Copy Destination:=Sheets("MIKE_BOM").Range("A1")
ActiveSheet.Columns(PN).Copy Destination:=Sheets("MIKE_BOM").Range("B1")
ActiveSheet.Columns(DESC).Copy Destination:=Sheets("MIKE_BOM").Range("C1")
ActiveSheet.Columns(QTY).Copy Destination:=Sheets("MIKE_BOM").Range("D1")
ActiveSheet.Columns(POS).Copy Destination:=Sheets("MIKE_BOM").Range("E1")