Re: Strange behaviour



Somewhat embarrasing to admit it ....

I am calling the program over and over again ...

and right at the start of the program I kill the file.

Many many thanks for all the suggestions ... I appreciate your time and
humbly apologise for wasting it all. :-(


jON

p.s. I did get some good tips there though .... freefile is a good one for
example so its not all wasted ....


"Jon Rowlan" <jon.rowlan@xxxxxxxx> wrote in message
news:%23EIUL0FFGHA.3168@xxxxxxxxxxxxxxxxxxxxxxx
>I have this function :
>
> Public Function LogError(Message As String)
>
> MsgBox LogFilePathName
>
> On Error GoTo LogErrorError
>
> Open LogFilePathName For Append As #1
> Print #1, Message
> Print #1, ""
> Print #1, "[" & Address(1) & "],[" & Address(2) & "],[" & Address(3) &
> "],[" & Address(4) & "],[" & Address(5) & "],[" & Address(6) & "]"
> Print #1, ""
> Close #1
> Exit Function
>
> LogErrorError:
> MsgBox "Error: " & Err.Number & ", " & Err.Description
>
> End Function
>
> I have put msgbox messages in before and after the Open/Write/close code
> and when I run my program calling this function is triggers fine. In vb
> debugger it also triggers fine.
>
> However, when compiled as a .exe the msgbox's fire up so that I can see
> the function entry and exit points are being traversed but my log file
> contains no entries. When running in the debugger the code executes and
> the log file is updated, just not when its compiled.
>
> I have checked with a msgbox that the contents of LogFilePathName contain
> a valid path, albeit converted to DOS 8.3 squiggly addresses.
>
> Am I doing something wrong ? The compiled program is not behaving as the
> interpeted one ????
>
> jON
>
> p.s. Address is a public dim'd array
>


.



Relevant Pages

  • Re: Strange behaviour
    ... I have used freefile throughout (an earlier statement was incorrect - I ... arguments to my log file and that code works. ... get to see the msgbox that shows me the path for the log. ... > MsgBox LogFilePathName ...
    (microsoft.public.vb.winapi)
  • Re: Strange behaviour
    ... Remove the error trap and compile and run. ... : MsgBox LogFilePathName ... function entry and exit points are being traversed but my log file ...
    (microsoft.public.vb.winapi)
  • Re: Populating ComboBox
    ... Try single stepping through the Click event to see where the execution is ... that should tell you what is calling it. ... backslash because if the application is in a root folder (easy if in a USB ... What I find surprising is the MsgBox is not even in any loop; ...
    (microsoft.public.vb.general.discussion)
  • Re: error 1079 while trying to enable security centre..
    ... coy of that log file. ... Never download Zipped files and run then from any site that you don't ... Calling an illegal alien an "undocumented worker" is like calling a ...
    (microsoft.public.security.virus)
  • Re: How to configure IIS
    ... Part of log file: ... Call to Unpublishing the default web site returned ok. ... calling Set Web Publishing Rules. ... >> configuration and when it got to the firewall configuration an error ...
    (microsoft.public.windows.server.sbs)