alivenwell
10-10-2007, 04:34 AM
Hi, I'm a complete newbie to Vba, so hopefully someone can help me with this simple code that I completely don't understand why it doesn't work.
lastcell = Cells.Find("Sunday", , xlValues, xlPart, xlByRows, xlPrevious, False).Column 'finding the last sunday on the timetable
lastcell = lastcell + 1 ' setting the first 1st value column after that sunday
lastcol = GetLast(shtCCL, False) 'using a private functon "Getlast", finding the last column with data in the sheet
Columns(lastcell, lastcol).Select 'using the lastcell column number and lastcol column number, select the columns from lastcell to lastcol
Selection.ClearContents 'deleting the values in that selection
Range("A1").Select
Thanks
lastcell = Cells.Find("Sunday", , xlValues, xlPart, xlByRows, xlPrevious, False).Column 'finding the last sunday on the timetable
lastcell = lastcell + 1 ' setting the first 1st value column after that sunday
lastcol = GetLast(shtCCL, False) 'using a private functon "Getlast", finding the last column with data in the sheet
Columns(lastcell, lastcol).Select 'using the lastcell column number and lastcol column number, select the columns from lastcell to lastcol
Selection.ClearContents 'deleting the values in that selection
Range("A1").Select
Thanks