OptionExplicitOptionCONSOLEOFFSubMainDIMXlbAsComObject,XlsASComObject,RngASComObject,xlappASComObjectxlapp.CreateObject("Excel.Application")xlapp.Visible=TRUEXlb=xlapp.Workbooks.AddXls=Xlb.WorkSheets(1)dimsNameasstringsName="Name"msgboxCallByName(xls,"Name")msgboxCallByName(xls,sName)Rng=CallByName(xls,"Range")("A1:A5")Rng.Font.Size=14Rng=Xls.Range("A2:A5")Rng.Interior.ColorIndex=36Rng.EntireColumn.Autofitxlapp.DisplayAlerts=FALSEmsgbox"click to continue..."xlapp.quitEndSub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link: