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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:20:37+00:00 2026-06-17T09:20:37+00:00

Here is the small script I wrote: Option Explicit Dim strFileFullName As String Sub

  • 0

Here is the small script I wrote:

    Option Explicit
Dim strFileFullName As String
Sub saveToText()
Open "PATH\File.txt" For Append As #1
Print #1, strFileFullName = ActiveWorkbook.FullName
Print #1, Sheets("Overview").Range("D14").Text
Close #1
End Sub

Also I would like to add some extra text to the .txt file that is not in the excel workbook. How would I go about doing that? Thanks!

  • 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-17T09:20:38+00:00Added an answer on June 17, 2026 at 9:20 am

    VB does not have a distinction between the comparison operator and the assignment operator. That is, they are both =. In this case, it is being interpreted as the comparison operator, which is returning false. (Compare this to C, where the comparison operator is == and the assignment operator is =; what you are trying to do here would work in C as an inline assign)

    It doesn’t look like you need the extra variable there, so you should be able to just do:

    Print #1, ActiveWorkbook.FullName
    

    Or, use two statements (VB will understand this as an assignment, not a comparison):

    strFileFullName = ActiveWorkbook.FullName
    Print #1, strFileFullName
    

    Adding text is as simple as adding another print statement:

    Print #1, "Lorem ipsum dolor"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Wrote a small php script to convert string to HEX but i have
I wrote a small PHP script to edit the site news XML file. I
I wrote a small shell script based on an example I found here: https://bbs.archlinux.org/viewtopic.php?id=36305
Here is my small script $item=Inception; $query=SELECT * FROM items WHERE item = '{$item}'
here is a small peice off code that i wrote. But I am not
I have a small script we're using to read in a CSV file containing
I wrote a small script that copies, then removes and then creates a symbolic
Here is the code for a small program I just wrote to test some
I wrote a small bash script to check if a website is up or
I wrote a small PHP script which does a branding on a present PDF

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.