Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Need to Keeping Same Display Value on 2 Workbooks

I am using Excel 2003 and have 2 XLS files.

In Workbook1 cell A1 is defined as =TEXT(NOW(),"yymmddhhmmss") which, for
example, correctly displays the format of 100409153548.

Workbook2 has a macro (thanks to Ron de Bruin) that copies data from
Workbook1 to Workbook2. My issue is the value from Workbook1 cell A1 shows
in Workbook2 as ...

1.00409E+11

How can I get the copied cell in Workbook2 to display as 100409153548?


Part of the macro that copies the data over uses the Value property to copy
a range to Workbook2, as follows...

With SourceRange
Set DestRange = DestRange.Resize(.Rows.Count, .Columns.Count)
End With
DestRange.Value = SourceRange.Value
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default Need to Keeping Same Display Value on 2 Workbooks

Try
With DestRange
.Value = Format(SourceRange.Value,"yymmddhhmmss")
.EntireColumn.AutoFit
End With



--
Regards
Dave Hawley
www.ozgrid.com
"GEdwards" wrote in message
...
I am using Excel 2003 and have 2 XLS files.

In Workbook1 cell A1 is defined as =TEXT(NOW(),"yymmddhhmmss") which, for
example, correctly displays the format of 100409153548.

Workbook2 has a macro (thanks to Ron de Bruin) that copies data from
Workbook1 to Workbook2. My issue is the value from Workbook1 cell A1
shows
in Workbook2 as ...

1.00409E+11

How can I get the copied cell in Workbook2 to display as 100409153548?


Part of the macro that copies the data over uses the Value property to
copy
a range to Workbook2, as follows...

With SourceRange
Set DestRange = DestRange.Resize(.Rows.Count, .Columns.Count)
End With
DestRange.Value = SourceRange.Value


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Workbooks and keeping the formulas only? John Excel Discussion (Misc queries) 3 September 12th 08 08:45 PM
Keeping Links Consistent Between Workbooks [email protected] Excel Discussion (Misc queries) 7 April 17th 07 08:11 PM
Keeping data once referenced workbooks are closed. stuckupnorth Excel Discussion (Misc queries) 1 July 12th 06 10:37 AM
Display 2 formulas from source workbooks to destination workbooks Excel_seek_help Excel Discussion (Misc queries) 4 April 27th 06 08:13 PM
Keeping 2 Excel workbooks open at the same time Royal Excel Discussion (Misc queries) 2 April 18th 05 10:10 PM


All times are GMT +1. The time now is 08:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"