Can I eliminate this "File Now Available" -- Read-Write error message?

EssKayKay

Active Member
Joined
Jan 5, 2003
Messages
361
Office Version
  1. 2007
Platform
  1. Windows
Hello,

I’m receiving an error when attempting to run a select part of my code. There are eight parts of my total routine. However, when testing, it appears the second portion is where my problem occurs (cmdTest2_Click).

The error is:
1726279866529.jpeg



Here is a snipit of my code –

VBA Code:
Private Sub cmdTest1_Click()
Application.ScreenUpdating = False
Application.EnableEvents = False

ActiveWorkbook.Save
Range("TempCell") = "Repair"

'- - - - - - - - - - - Set variables - - - - - - - - -
Dim FilePath, FileOnly, PathOnly As String
FilePath = ThisWorkbook.FullName
FileOnly = ThisWorkbook.Name

   Range("T5") = PathOnly
   Range("T6") = FileOnly

   Range("T16").Copy
   Range("U16").PasteSpecial Paste:=xlPasteValues

'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Call ClearALL

Dim aFile As String
On Error Resume Next
    aFile = ActiveWorkbook.Path & Application.PathSeparator & "Amort_Temp.xlsb"
    Kill aFile

    ActiveWorkbook.Names("LookupDate").Delete
    ActiveWorkbook.SaveAs ActiveWorkbook.Path & Application.PathSeparator & "Amort_Temp.xlsb"
End Sub



‘. . . . . . . . . . .  IT APPEARS THIS IS WHERE THE PROBLEM OCCURS  . . . . . . . . . . . . . . . . . . . . . . . . . .

Private Sub cmdTest2_Click()
    Application.DisplayAlerts = False
    Workbooks.Open("" & Range("T5") & Range("T6") & "").RunAutoMacros Which:=xlAutoOpen
End Sub

T5 = C:\Users\?????\Desktop\
T6 = TryMe.xlsb

I was hoping to find a way to open TryMe NOT as Read Only. I would have thought being Read Only wouldn’t matter as I am only copying from TryMe not modifying it but apparently this is not the case. Any suggestions would be appreciated.

Thanks for viewing,
Steve K.
 
Last edited:

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
As you should well know by now:

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Last edited:
Upvote 0
Here's is the link to my other post as requested.

I assume the reason people double post (or at least is the case in my point) - I feel the more eyes looking at a problem the better the chance of finding a resolution.
I will probably not stop double posting in the future when I do not find a "fix" to what ever is the problem is but I will most certainly note my double post in both forums.

Thanks for the heads-up - much appreciated,
Steve K.
 
Upvote 0
I'd already posted that link. Please post all others.
 
Upvote 0
That's only one link (you just reposted the EF one I had already posted). I know you have at least one other...
 
Upvote 0
That's only one link (you just reposted the EF one I had already posted). I know you have at least one other...
I'm sorry Rory but I'm confused. I have about 27 postings over on EF dating back to 2006. There are a few I posted in the last few months. Do you want these links?
Again, I'm not quite sure how to proceed.
 
Upvote 0
No. You have posted this question on at least one other forum (besides EF). That is what we need links to.
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,790
Members
451,589
Latest member
Harold14

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top