Results 1 to 10 of 15

Thread: Format Function In VBA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    14
    Code:
    Sub M_snb()
        Dim x00 As String, x01 As String, x02, x03
        
        x00 = Format(1234)
        x01 = Format$(1234)
        
        x02 = Format(1234)
        x03 = Format$(1234)
        
        x04 = Format(1234)
        x05 = Format$(1234)
        MsgBox VarType(x00) & vbTab & TypeName(x00) & vbLf & VarType(x01) & vbTab & TypeName(x01) & vbLf & VarType(x02) & vbTab & TypeName(x02) & vbLf & VarType(x03) & vbTab & TypeName(x03) & vbLf & VarType(x04) & vbTab & TypeName(x04) & vbLf & VarType(x05) & vbTab & TypeName(x05)
        
    End Sub
    In VBA at least any 'difference' is absent; see also the locals window.
    Of course in the local window only x00 and x01 are 'real 'strings'.
    Last edited by snb; 07-04-2013 at 03:35 PM.

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
  •