By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,035 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,035 IT Pros & Developers. It's quick & easy.

Need help with ini read/write

P: 1
ok i figured out how to write to the ini what im trying todo i have a command button
and i need it to use the filepath thats in the ini for the command button can any one help sry im new thx in advance
Jan 16 '08 #1
Share this Question
Share on Google+
1 Reply


kadghar
Expert 100+
P: 1,295
ok i figured out how to write to the ini what im trying todo i have a command button
and i need it to use the filepath thats in the ini for the command button can any one help sry im new thx in advance
i'll asume you've read the ini into a string, so just use INSTR and MID to search and extract the substring you need e.g. :

Expand|Select|Wrap|Line Numbers
  1. public function SubStr(byval Str1 as string, byval StartStr as string, byval EndStr as string) as string
  2. dim i as integer
  3. i = instr(str1,startstr)
  4. substr = mid(str1,i,instr(i,str1,endstr)-i+1)
  5. end function
this way:
if Str1 = "well, this is a test for finding a path in c:\myfiles\mydoc.exe and i hope i'll find it well"

substr(str1,"c:"," ") will return c:\myfiles\mydoc.exe
(then just remove the blank space at the end of it)
Give it a try
HTH
Jan 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.