Issue opening excel files via VBA

Assamita

Board Regular
Joined
Sep 23, 2011
Messages
131
Hi Excel gurus.
I have an automated process that, among a whole lot of other things, at one point, long story short, it opens some files from a network, copies the content from them and closes them again.

This process was working no issues in a local machine where the network servers were located. Recently, this process was moved to a virtual machine with access to this network, but in another server location.
Ever since then, looks like this process has some troubles opening some of these files, they get stuck in the Downloading screen, and don't open up until I hit "Cancel", which odd enogh, opens the file.

I suspect it might have to do with cache memory or something like that.
My code doesn't include any Set Excel.Application or Set wb = Nothing, or anything like that. It just opens the workbooks and closes them (I'm not a programmer, I'm just a self-learner with some-but-not-much programming knowledge). Could that be a reason? I don't know what the above statements actually do.

Thank you in advance
 
Last edited:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Please post your code

SET is used to assign a value to an object. So you have a workbook object (variable) called wb. Unlike a normal variable you can't just give it a value, you have to assign something to it so you would e.g.
Code:
Set wb = workbooks("workbook name")
to create the object variable. Then to clear memory later you would
Code:
Set wb = nothing
to clear it from memory.
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,243
Members
448,555
Latest member
RobertJones1986

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