Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6011425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:15:30+00:00 2026-05-23T02:15:30+00:00

temps(X) = set port name *** DESCRIPTION *** *** PORT *** first = InStr(temps(x),

  • 0
temps(X) = "set port name *** DESCRIPTION *** *** PORT ***   "

first = InStr(temps(x), "***")   ' find start postition 
last = InStr(InStr(1, temps(x), "***") + 1, temps(x), "***") 'find end

snip = Mid(temps(x), first, last)

MsgBox (snip)

Why does this result in the out put

*** DESCRIPTION *** *** PORT **

and not the expected *** DESCRIPTION ***

Cheers

Aaron

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:15:31+00:00Added an answer on May 23, 2026 at 2:15 am

    instr takes the parameters as string, startpos, len … so it’s failing because you’ve assumed the parameters are: string, startpos, endpos.

    You can fix your code by doing this instead:

    snip = Mid(temps(x), first, last - first)
    

    Note as well that your construct:

    last = InStr(InStr(1, temps(x), "***") + 1, temps(x), "***")
    

    can be written more simply. Note that you’ve already done Instr(1, temps(s), "***") once when you got the value for first, so you can rewrite that line to the much more simple:

    last = InStr(first + 1, temps(x), "***")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Nginx as my front-end web server listening on port 80. And certain
Application[temp] = 8; should set the value 8 to the key temp . However,
I'm creating a temp table that's the result of a stored procedure's result set.
Using VB6 code Dim fso As FileSystemObject Dim TS As TextStream Dim TempS As
string temp is equal to ZERO:\t.WORD\t1 from my debugger. (the first line of my
I wrote a simple server in C. It answers connections on port 8888. It
I want to do something like this: declare @temp as varchar set @temp='Measure' if(@temp
What's wrong with this T-SQL : DECLARE @temp TABLE(ID INT IDENTITY,[Value] VARCHAR(100)) SET @temp
I recently set up a Nginx server to host a wordpress install and am
I am writing my join query by the following way UPDATE UPLOAD_TEMP SET UPLOAD_TEMP.Borr_Add_Req

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.