Consulting

Results 1 to 5 of 5

Thread: Error in expression

  1. #1
    VBAX Mentor
    Joined
    Aug 2011
    Posts
    353
    Location

    Error in expression

    I keep getting an error with the following expression in my macro:

    [VBA]Sub Name()
    '
    ' Name Broker
    '
    Columns("F:F").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Range("F1").Select
    ActiveCell.FormulaR1C1 = "Broker"
    Range("F2").Select

    End Sub[/VBA]

    Do you know whats wrong?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I'll tell you when you add VBA tags to your code.
    ____________________________________________
    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
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    You used a reserved keyword, Name. Use another name for your Sub.

  4. #4
    VBAX Mentor
    Joined
    Aug 2011
    Posts
    353
    Location
    what are VBA tags

  5. #5
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,724
    Location
    See the FAQ here.
    Be as you wish to seem

Posting Permissions

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