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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:55:18+00:00 2026-06-10T15:55:18+00:00

Essentially the code is just creating a text file in a directory that is

  • 0

Essentially the code is just creating a text file in a directory that is filled with information. Like the title says I can open the worksheet in excel 2003 and it will run fine but if it runs in 2010 there is an error that pops up saying Run-time error “70” Permission denied.

Here is the code:

Dim i As Integer
Dim dataType As String
Dim dataName As String

Application.ScreenUpdating = False

ChDir ThisWorkbook.Path  'sets the directory to where the workpaper is
ChDir ".." 'Moves up a directory
ChDir (".\folder\")

direct = ThisWorkbook.Path

Worksheets("SchSB XML").Select

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(direct & "\" & flName &  ".xml", True)

a.writeline ("<?xml version=" & Chr(34) & "1.0" & Chr(34) & " encoding=" _
    & Chr(34) & "UTF-8" & Chr(34) & " standalone=" & Chr(34) & "yes" & Chr(34) & "?>")
a.writeline ("<SchSB xmlns:ns1=" & Chr(34) & "http://efast.gov/2011" _
    & Chr(34) & " xmlns:xsi=" & Chr(34) & "http://ww.w3.org/2001/XMLSchema-instance" & Chr(34) & ">")

There is a loop after this but it contains the same a.writeline code as above that rotates through ~100 cells

Debug is showing the Set fs = CreateObject(“Scripting.FileSystemObject”) is breaking and showing the permission denied error.

  • 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-10T15:55:20+00:00Added an answer on June 10, 2026 at 3:55 pm

    Even with ‘late binding’ you still need to check that the entry for “Microsoft Scripting Runtime” is present in the references list, and also that it is pointing to the correct filepath, e.g a network share that user’s across all computers would have access to like:

    Z:\Lib\scrrun.dll
    

    As oppose to:

    C:\Users\"Username"\...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Essentially, I'm looking for a 1D bar-code scanner that I can program, either through
I hava a CSV file that I want to treat as source code. Essentially
The following code essentially cats a file with select.select(): f = open('node.py') fd =
Is it possible to shorthand the code below? Essentially metaItem.Text is a string property
I'm trying to write code that will traverse an undirected, unweighted graph. Essentially, the
I'm doing IPC between Java and some C code by just creating an external
This questions involves 2 different implementations of essentially the same code. First, using delegate
Essentially, is there any way to make this code legal? main = print .
Is the code below bad practice or undefined behavior? Essentially i am calling a
In my Lua code (using the Corona SDK), my issue essentially boils down to

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.