I'm using workbooks that are updated daily via a macro in a master workbook (it reads the current info, deletes that which are out of date and adds anything new. One of the workbooks isn't formated properly - I've tried adding a macro to do this but becuase it freshers from the master workbook, the macro disppears each time it's refreshed. This is the bit of code from that master workbook that I think relates to the workbook that I want to format I just want to change column Q to a width of 80 and wrap the text within column Q - can anyone tell how to add this in to the code below?
Set wbTemp = Workbooks.Open(wbProcessWorkbook.Path + "\Medicine15PlusDayStayers.xls") Set wsTemp = wbTemp.Worksheets("15 Plus Day Stayers") nRow = 2 While wsTemp.Cells(nRow, 1) <> "" nRow = nRow + 1 Wend nRow = nRow - 1 If nRow >= 2 Then Set rngCells = wsTemp.Range(wsTemp.Cells(2, 1), wsTemp.Cells(nRow, 17)) rngCells.Copy (wsOld.Cells(nNextRow, 1)) nNextRow = nNextRow + nRow - 1 End If wbTemp.Close
Last edited by a moderator: