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 8943705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:50:47+00:00 2026-06-15T11:50:47+00:00

How to make it’s possible in vb6, for example i want to show result

  • 0

How to make it’s possible in vb6, for example i want to show result in Sub Action() and on Btn1_Click() but i set all required Object and String on Form_Load():

Private Sub Form_Load()
Dim ObjFso As Object
Dim TheText As String
Set ObjFso = CreateObject("Scripting.FileSystemObject")
TheText = "Hello"
Call Action
End Sub

Public Sub Action()
ObjFso.CreateTextFile("Test.txt").WriteLine(TheText)
MsgBox TheText, 0, "This is the text"
End Sub

Private Sub Btn1_Click()
If ObjFso.OpenTextFile("Test.Txt",1).ReadLine = TheText Then
MsgBox "Success", 64, "Ok"
Else
MsgBox "Fail", 16, "Ouch"
End If
End Sub
  • Are it’s possible that the script creating text file “Test.txt” with “Hello” text inside?
  • Are it’s possible to show MsgBox with “Hello” text?
  • Are it’s possible when i press Btn1 i got “Success” Message Box?

  • Note: I ask this because i don’t know about vb6 arguments like Call TheSub(arguments), i just know arguments in VBS but not in VB6, so please don’t close this question 🙂

  • 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-06-15T11:50:49+00:00Added an answer on June 15, 2026 at 11:50 am

    There is no difference with any other modern language.

    You can decalare ‘Dim TheText As String‘ globally at the beginning of the form code.So you can access it in any Sub or Function of the form.

    Also you can call CallAction like CallAction(theText) using as a parameter.Your CallAction sub will be

    public sub CallAction(text as String)
    msgbox text
    end sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Make things as simple as possible, but no simpler. Can we find the solution/s
I make a bot program and i want to send some keyboard keys between
To make my Ant Generated swf as small as possible, i used the Runtime
I want to count how many characters a certain string has in PHP, but
Want make a mind map like the following: Image link is not available anymore.
I make asynchronous call for same URL for multiple times, But the response came
I make one action method for 2 activities (new input and edit), and there
I make a java application using netbeans that connect to database , but i
I make my own GUI see here but system is taking too much resources
I make a jquery .ajax call and I'm expecting a json result. The catch

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.