Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 6th, 2007, 08:05 AM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default INI's and stuff!

Everytime i try and run my project i get an error message saying error 75, Error File/Path access, or something like tht, anyways it highlights the code which is this:

Code:
    Open iniPath For Append As #1   'if the file doesn't exist... it will in a minute.
    Close #1                        'it exists now.


Now when i hover my cursor over iniPath it has a little tip box display saying iniPath = "" and i've looked through all my code and there is no where this is defined. or anything like tht, how do i fix it basically. the full code is here:

Code:
Function GetINIData(ByVal iniSection As String, ByVal iniSetting As String, ByVal iniDefault As String, ByVal iniPath As String) As String
Dim tmpIncoming As String

If iniSection = "" Or iniSetting = "" Then Exit Function
Open iniPath For Append As #1   'if the file doesn't exist... it will in a minute.
Close #1                        'it exists now.
Open iniPath For Input As #1    'and so we can open it :D
Do Until EOF(1)
    Input #1, tmpIncoming
    If LCase(tmpIncoming) = "[" & LCase(iniSection) & "]" Then
        Do Until EOF(1)
            Input #1, tmpIncoming
            If Left(tmpIncoming, 1) = "[" Then
                Exit Do
            ElseIf Left(LCase(tmpIncoming), Len(iniSetting) + 1) = LCase(iniSetting) & "=" Then
                GetINIData = Right(tmpIncoming, Len(tmpIncoming) - (Len(iniSetting) + 1))
            End If
        Loop
        Exit Do
    End If
Loop
If GetINIData = "" Then GetINIData = iniDefault
Close #1
End Function
thnx in advance for any help


------------------------------------------------
Apocolypse2005
Always ready and waiting to be helped!
__________________
Apocolypse2005, I'm a programmer - of sorts.
 
Old May 6th, 2007, 06:14 PM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Scrap tht dont worry i've sorted it out!
 
Old May 8th, 2007, 11:38 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Apo,

If you wouldn't mind, posting the solution that you found would make it so that later, when others search the web site and come across your post, they would be able to get a clue to fixing their problem.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: Have no borders and stuff! Apocolypse2005 Beginning VB 6 7 May 8th, 2007 11:56 AM
hp exam stuff ? olango Need help with your homework? 1 September 23rd, 2006 06:47 PM
Basic Stuff... Colm_L Javascript How-To 0 September 14th, 2006 08:02 AM
DAL 'stuff' pithhelmet VB Databases Basics 0 November 10th, 2004 04:42 PM
Debug Stuff wolftrap1 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 January 13th, 2004 10:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.