Results 1 to 10 of 15

Thread: Format Function In VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Member Transformer's Avatar
    Join Date
    Mar 2012
    Posts
    91
    Rep Power
    14
    Hi snb,

    There is a difference.Check the following code:

    Code:
    Sub Test()
        
        Dim dteToday    As Date
        Dim strToday    As String
        
        dteToday = Format(Now())
        strToday = Format$(Now())
        
        MsgBox dteToday & vbTab & TypeName(dteToday) & vbNewLine & strToday & vbTab & TypeName(strToday)
        
    End Sub
    Last edited by Transformer; 07-04-2013 at 09:29 AM.
    Regards,

    Transformer

Similar Threads

  1. Replies: 3
    Last Post: 04-05-2013, 08:24 AM
  2. Programmatically format VBA buttons
    By Belleye in forum Excel Help
    Replies: 9
    Last Post: 09-25-2012, 11:18 AM
  3. Convert Text In YYYYMMDD Format To Date Format
    By S M C in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 02-28-2012, 12:04 AM
  4. Replace Currency Format From One to Another at One go !! (VBA)
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 07-19-2011, 09:13 PM
  5. Save File In CSV Format VBA
    By Raj Kumar in forum Excel Help
    Replies: 3
    Last Post: 06-01-2011, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •