View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SteveS[_4_] SteveS[_4_] is offline
external usenet poster
 
Posts: 1
Default Copy Number Formats


I must be missing something obvious here... I am trying to use a rang
copy to copy values and formats from a series of worksheets. Th
values come over fine, but the number formats do not.

What is the trick to copy number formats? The vba is:
With sh.Range(sh.Cells(FirstRow, FirstCol)
sh.Cells(shLast, LastCol))
DestSh.Cells(Last + 1, 1).Resize(.Rows.Count, _
.Columns.Count).Value = .Value
DestSh.Cells(Last + 1, 1).Resize(.Rows.Count, _
.Columns.Count).NumberFormat = .NumberFormat
End With

Thanks,
Stev

--
Steve
-----------------------------------------------------------------------
SteveS's Profile: http://www.excelforum.com/member.php...fo&userid=1011
View this thread: http://www.excelforum.com/showthread.php?threadid=26838