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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:18:59+00:00 2026-05-11T15:18:59+00:00

The first part is now working [ I have the following which just seems

  • 0

The first part is now working [ I have the following which just seems to hang; the part that adds/deletes the module works when running in VBA I note that I’m prompted with a dialog saying ‘this workbook contains links to other data sources’ which I ok to, then it hangs So I tried setting the second argument to 0 and also tried 2 but still it hangs (2nd arg is UpdateLinks as can be found here ) ]

dim objExcel dim objWorkbook Set objExcel = CreateObject('Excel.Application') Set objWorkbook = objExcel.Workbooks.Open(  'H:\M\X\C.xls', 0 , , ,'PASSWORD!' )  Const modpath  = 'H:\M\V\' Const modtest  = 'TEST.cls' Const modname  = 'TEST'  On Error Resume Next  Dim vbcomp Set vbcomp = ActiveWorkbook.VBProject.VBComponents(modname) objWorkbook.VBProject.VBComponents.Remove vbcomp objWorkbook.VBProject.VBComponents.Import modpath & modtest  objWorkbook.Save objWorkbool.Close set vbcomp = nothing set objworkbook = nothing set objExcel = nothing 

edited again 14/04/2009 I have now also allowed the ‘tools – macro – security – vbproject access’

The script now finishes, however, when trying to open the xls to see if the changes have been made, I get a message informing me that the sheet is locked by ‘account used to run script’; open ‘read only’/notify

Why isn’t it releasing control correctly**?**

  • 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. 2026-05-11T15:19:00+00:00Added an answer on May 11, 2026 at 3:19 pm

    The edited script works.

    The problem was caused by the fact that I was supplying the password at the workbook level and not at the VBA project level.

    A quick search on the web reveals that it is not possible to do this anyway (sendkeys etc) so after manually removing the password on the project, the problem is solved

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

Sidebar

Related Questions

I have a couple of scripts for which the first part of them looks
I'm working on my first big WPF MVVM application now, which uses MVVM Light
The first part of this question is now its own, here: Analyzing Text for
I've read that by standard first part of e-mail is case sensitive, however I've
I'm moving my first stpes in iOS development. I have followed the first part
For a couple of weeks now, I have been working on migrating my client
I have a file which contains lines of the following format: w1#1#x w2#4#b w3#2#d
I have a functionality of posting messages to a group which works using AJAX
After a while I got the first part of the Google Channel API working.
I have developed my first App which is free of charge (Aviation DG), and

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.