Results 1 to 8 of 8

Thread: chr$(34)

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    1

    chr$(34)

    Hello All,

    I have written a piece of code with the following line being used for quotes

    strQuote = Chr$(34)

    It is working fine on my computer however, when the file is run on another computer, it gives a compiler error that the library is not found and highlights the above line.

    Do we need any additional library to execute the above code.

    Thanks and Regards
    Last edited by ashishrajvanshi; Dec 15th, 2006 at 05:42 AM.

  2. #2
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: chr$(34)

    Try :

    strQuote = Chr(34)

  3. #3
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: chr$(34)

    check you references thru Project -> References and see whether any thing got highlighted there...
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: chr$(34)

    Quote Originally Posted by ashishrajvanshi
    however, when the file is run on another computer
    It's never a good idea to just copy a VB .exe file to another computer. Make a package and install the program on the other computer. It's possible that the needed library was never installed on the other computer, or the file got damaged.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  5. #5
    Member
    Join Date
    Dec 2006
    Location
    Ontario, Canada
    Posts
    32

    Re: chr$(34)

    If they dont have the VB6 runtimes it wont work very well at all.

  6. #6
    Addicted Member sigid's Avatar
    Join Date
    May 2006
    Location
    Massachusetts, USA
    Posts
    182

    Re: chr$(34)

    ...another idea is to declare a CONST such as CONST Q = """" (that's 4 double quotes in a row).

    But ganeshmoorthy is correct - if any intrinsic function yields the message about library not found, the project has a reference on one machine that does not exist on the other...

  7. #7
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: chr$(34)


    You will run into many problems if you don't actually install your app on other PCs. To do that you create a set of installation file using the P&D Wizard that comes with VB, Inno or some other 3rd-party installer.

    I've also moved your thread to this forum.

  8. #8
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: chr$(34)

    Quote Originally Posted by ashishrajvanshi
    Hello All,

    I have written a piece of code with the following line being used for quotes

    strQuote = Chr$(34)

    It is working fine on my computer however, when the file is run on another computer, it gives a compiler error that the library is not found and highlights the above line...
    Thread rather "belongs" to VB.Classic forum...

    Anyway, for unknown reason VB6 may lose references to VBA library although it still appears in the list of project's references. You can do either:

    - recreate your project by create a brand new and addid all objects from the existing and then save new by overwriting the old one.
    - or add VBA namespace in front of the "offensive" functions:

    VBA.Left$
    VBA.Chr$()
    etc...

    If there are too many occurences then you can utilize Find/Replace With functionality:

    search for Chr$ and replace it with VBA.Chr$ ...

Posting Permissions

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



Click Here to Expand Forum to Full Width