View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mike mike is offline
external usenet poster
 
Posts: 4
Default formatting ques...

I want Excel to store an actual time (like "8:00") taken
from a cell in my worksheet rather than the decimal
equivalent (like .025) excel uses to represent time. Is
there a function to convert this? currently I have
declared the variable as a string.

Also, I cannot get excel to format my user defined data
type so it has a number format of "ddd" (which is the name
of the day, like mon, tue, etc..) My code is as follows:

Dim DateCell As Range
Set DateCell = Worksheets(1).Cells(row, 5)
DateCell.NumberFormat = "ddd"
Switching(i).DayofWeek = DateCell

where switching is my user defined data type and DayofWeek
is declared as a string. the data in Worksheets(1).Cells
(row,5) is a date and formatted like "11/15/2003"

thanks