Consulting

Results 1 to 4 of 4

Thread: Solved: test appearance of Code vs VBA

  1. #1

    Solved: test appearance of Code vs VBA

    Sub Hello()
        MsgBox "Hello World!"
    End Sub
    [vba]Sub Hello()
    MsgBox "Hello World!"
    End Sub
    [/vba]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    VBA is 'better' as it recognises keywords, but Code presrves your format. It's a tough call.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Yeah, that's one thing that utterly irritates me about trying to post code to the forum. Sometimes it deletes the whitespace and you lose your indenting. This is especially noticable if you preview your response before submitting it.

    Any solution or workaround for that?

    Scott

  4. #4
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Any solution or workaround for that?
    It doesn't always work, but often when I use VBA tags I can add in whitespace manually and have it stick, but the indent sections seem to be based on 4 spaces each.

    [vba]If something Then
    some crap
    If something else Then
    some more _
    & crap
    End If
    End If[/vba]

    NinjaEdit: Hmmm... okay, I can't duplicate the whitespace like I thought I could.

    For me keyword recognition is the big thing, so I use VBA tags.
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


Posting Permissions

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