LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Use of Today() and change data type

Hi all


How would I insert the date into a cell (programatically) then change its
data type to text.
Currently, when I open the file days later, of course, Excel populates the
cells with the current date.
My desired end result is subsequent openings will display the date the cell
was originally populated. (Needs to stay the same always.)

Does anyone have a better idea how to do this?


I have the following


With oExcel
.Range("L1").Select
.Selection.NumberFormat = "General"
.ActiveCell.FormulaR1C1 = "WorkOrder"
.Range("L2").Select
.ActiveCell.FormulaR1C1 = z
.Range("L3").Select
.ActiveCell.FormulaR1C1 = z
.Range("L2").Select
.Selection.AutoFill Destination:=.Range("L2:L3"), Type:=xlFillDefault
.Range("L2:L3").Select
' .Selection.AutoFill Destination:=.Range("L2:L99"), Type:=xlFillDefault
.Selection.AutoFill Destination:=.Range("L2:L" & DATAcount + 1),
Type:=xlFillDefault

' .Range("L2:L99").Select

.Range("M1").Select
.Selection.NumberFormat = "@" '"General"
.ActiveCell.FormulaR1C1 = "DateRun"
.Range("M2").Select
.ActiveCell.FormulaR1C1 = "=TODAY()"
.Range("M3").Select
.ActiveCell.FormulaR1C1 = "=TODAY()"
.Range("M2:M3").Select
.Selection.AutoFill Destination:=.Range("M2:M" & DATAcount + 1),
Type:=xlFillDefault
' .Range("M2:M99").Select
' .ActiveWindow.LargeScroll Down:=-2
' .ActiveWindow.LargeScroll ToRight:=-1
.Range("N1").Select
' .ActiveWorkbook.Save
.ActiveWorkbook.Close SaveChanges:=True


End With


Regards
Dale


 
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
Change ref type Matt Excel Discussion (Misc queries) 5 November 21st 08 07:01 PM
How do you change the data type of a cell using VBA? justme0010 New Users to Excel 2 January 14th 08 02:38 PM
Change chart type in single data series, Excel 2007 momof3 Charts and Charting in Excel 3 June 30th 07 02:45 PM
how to change all the words of one type(Gunsuh type)to another metumevlut Excel Discussion (Misc queries) 2 November 11th 05 03:29 PM
Can I use TODAY Function in a formula that will not change it the. Tucson Guy Excel Discussion (Misc queries) 1 December 19th 04 09:32 AM


All times are GMT +1. The time now is 08:29 AM.

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

About Us

"It's about Microsoft Excel"