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

  • Home
  • SEARCH
  • 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 7651809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:35:55+00:00 2026-05-31T11:35:55+00:00

I am writing VB6.0 projects (DLL with COM+) starting from previously written code. I

  • 0

I am writing VB6.0 projects (DLL with COM+) starting from previously written code.
I have a “main” Class Module CLS file with “main” Functions, and the Process flow etc.
I have also a “side” Module BAS where I save all the Functions / Subroutines to use as tools in my “main” Class Module.

I have written a very very straightforward logging system (because I feel very unconfortable with App.LogEvent(“blablabla”) ) but I am not able to compile the DLL. The message points me to the CLS call and I think the problem is related to the Sub that should return a value, but I do not want to return any value from that Sub!
I am quite new to VB6.0 and improving existing source code it is quite difficult.

Here is my Module BAS

Public Sub LogMyApp(ByVal sFunctionName As String, ByVal sLogEntry As String)

    Dim sLogPath As String
    sLogPath = "C:\Temp\MyLog.txt"

    Dim fn As Integer
    fn = FreeFile

    Open sLogPath For Append As #fn
    Write #fn, Now & "|" & sFunctionName & "|" & sLogEntry
    Close #fn

End Sub

Here is my Class Module CLS call to that Sub inside the BAS Module

LogMyApp ( "FunctionBlaBla" , "blablabla" )

Any help is really appreciated!
Thanks a lot!

  • 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-31T11:35:57+00:00Added an answer on May 31, 2026 at 11:35 am

    Simple fix, remove the parens as you are not calling a function;

    LogMyApp "FunctionBlaBla" , "blablabla"
    

    (Or as purely a visual thing prefix with the Call keyword; call LogMyApp(...))

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a bit of code ported from VB6 to VB.NET. It uses Write and
We have a Com+ VB6 DLL used in our asp classic application. After upgrading
I have some vb6 code that is stubbornly writing to Windows-1252. Open fileName For
We have COM dll which was written in C++ and has been used by
I am porting an old 3 2-bit COM component that was written in VB6
Hi i am writing a socket client/server application in VB6. i have the following
I have an application written in VB6 that writes data to a spreadsheet. I'm
We are writing a plugin for an existing VB6 application (via COM interop), and
I have a VB6 ActiveX DLL that has run fine on all our machines
My work has an application written in VB6. I am tasked with writing another,

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.