+ Reply to Thread
Results 1 to 4 of 4

Is instr function re-entrant in VBA?

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    58

    Is instr function re-entrant in VBA?

    I've implemented a callback function with instr in it so far it seems working but I am asking myself if INSTR design is safe in terms of re-entrancy?

    I have goggled this but I could not get a definitive answer on this

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    What exactly do you mean by 'safe'?

    What would you regard as unsafe?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-25-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    58

    Re: Is instr function re-entrant in VBA?

    calling a global variable or access to a common resource is non-safe in re-entrant code section.

    I am not certain if I could treat "instr" re-entrant safe? There's little documentation on that aspect

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Is instr function re-entrant in VBA?

    I'm intrigued as to what exactly you could be doing in an Excel workbook where this would possibly matter with reference to a built in function. If you're concerned about the modification of variables then pass variables byVal and don't use public

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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