Contributions
- 1.2KViews0likes0Comments
Excel Ranges - Using Column Numbers rather than letters
Hi all, As part of one of my routines, I'd like to "Clear Contents" of a range in Excel, using the COM object. However, I'd like to use numbers to represent the columns rather than letters. Is that possible? The method below didn't work, which I tried from using an example from StackExchange. http://stackoverflow.com/questions/13157363/create-excel-ranges-using-column-numbers-in-vba Sub clearRange set xl = Sys.OleObject("Excel.Application") xl.Visible = TRUE Set workbook = xl.ActiveWorkbook Set range1 = workbook.ActiveSheet.Range(.Cells(11, 8), .Cells(15, 12)) range1.clearContents End Sub Thanks, MSolved1.9KViews0likes2Comments