+ Reply to Thread
Results 1 to 9 of 9

exclamation mark and apostroph in VBA excel language

  1. #1
    Registered User
    Join Date
    11-28-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2010
    Posts
    37

    exclamation mark and apostroph in VBA excel language

    Hi,
    My VBA is supposed to put " '! " into come cells but I get a compile error "expected end of statement".
    Can you please help me to express the ' and ! in the vba languauge?

    Br
    Kris

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: exclamation mark and apostroph in VBA excel language

    Shishek,

    Can we see your macro code?

    If posting VBA code, please use Code Tags - like this:

    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    11-28-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: exclamation mark and apostroph in VBA excel language

    Stanley,
    This is what I have problems with: '!

    Please Login or Register  to view this content.
    Help would be much appreciated!

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: exclamation mark and apostroph in VBA excel language

    Assuming FileName is a variable I think it should be like this.
    Please Login or Register  to view this content.
    Last edited by Norie; 02-23-2013 at 05:20 PM.
    If posting code please use code tags, see here.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: exclamation mark and apostroph in VBA excel language

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    11-28-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: exclamation mark and apostroph in VBA excel language

    As I wrote: I don't know how to express the apostrophe " '! " in the below code:
    Please Login or Register  to view this content.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: exclamation mark and apostroph in VBA excel language

    The apostrophe isn't the problem, you have that in the right place.

    What's wrong is a missing double quote ater 'Data\[' and before the &.

  8. #8
    Registered User
    Join Date
    11-28-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: exclamation mark and apostroph in VBA excel language

    Right! Thanks a lot to you all!

  9. #9
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: exclamation mark and apostroph in VBA excel language

    Shishek,

    You are very welcome. Glad we could help.

    Come back anytime.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1