ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dir () code -- Dave Peterson (https://www.excelbanter.com/excel-programming/306739-re-dir-code-dave-peterson.html)

Dave Peterson[_3_]

Dir () code -- Dave Peterson
 
This is just a guess--I don't have access to a network.

But maybe you could add a line

DoEvents

right before the line that says to go get another filename.

If that doesn't help, you may want to post the code. Maybe someone on a network
can test it and come up with a better solution.




Myriam wrote:

I have been using Dave Peterson's code to retrieve directories. I did add the
application.volatile to recalculate/update the list. It works perfect in my
C drive.
However, when I am in a net, and retrieving dir from a server it gets
somewhat "confused". What I am thinking is that it takes a few more seconds
to retrieve the info from the net and the list does not get updated until I
close and open the form again.

Could you please help me one more time? How can I refresh it without closing
the form?

Thanks!


--

Dave Peterson


Myriam

Dir () code -- Dave Peterson
 
Thanks. I'll try that tomorrow when I get to the network. I'll post back the
results.

"Dave Peterson" wrote:

This is just a guess--I don't have access to a network.

But maybe you could add a line

DoEvents

right before the line that says to go get another filename.

If that doesn't help, you may want to post the code. Maybe someone on a network
can test it and come up with a better solution.




Myriam wrote:

I have been using Dave Peterson's code to retrieve directories. I did add the
application.volatile to recalculate/update the list. It works perfect in my
C drive.
However, when I am in a net, and retrieving dir from a server it gets
somewhat "confused". What I am thinking is that it takes a few more seconds
to retrieve the info from the net and the list does not get updated until I
close and open the form again.

Could you please help me one more time? How can I refresh it without closing
the form?

Thanks!


--

Dave Peterson



Myriam

Dir () code -- Dave Peterson
 
I tried DoEvents and it did not help.
The problems arises in late afternoon, I guess backing up server messes up
the connections (?). During the day, and only sometimes, the list box
displaying the files shrinks to one line only. ( I gave it enough space to
display 4 files at a time).This happens when I run the program in the network
(again in my C drive is perfect). Is there a property that maybe I am not
setting properly?

Thanks for all your help!


"Myriam" wrote:

Thanks. I'll try that tomorrow when I get to the network. I'll post back the
results.

"Dave Peterson" wrote:

This is just a guess--I don't have access to a network.

But maybe you could add a line

DoEvents

right before the line that says to go get another filename.

If that doesn't help, you may want to post the code. Maybe someone on a network
can test it and come up with a better solution.




Myriam wrote:

I have been using Dave Peterson's code to retrieve directories. I did add the
application.volatile to recalculate/update the list. It works perfect in my
C drive.
However, when I am in a net, and retrieving dir from a server it gets
somewhat "confused". What I am thinking is that it takes a few more seconds
to retrieve the info from the net and the list does not get updated until I
close and open the form again.

Could you please help me one more time? How can I refresh it without closing
the form?

Thanks!


--

Dave Peterson



Dave Peterson[_3_]

Dir () code -- Dave Peterson
 
I don't have a guess (and I don't have access to a network to test).

Sorry.



Myriam wrote:

I tried DoEvents and it did not help.
The problems arises in late afternoon, I guess backing up server messes up
the connections (?). During the day, and only sometimes, the list box
displaying the files shrinks to one line only. ( I gave it enough space to
display 4 files at a time).This happens when I run the program in the network
(again in my C drive is perfect). Is there a property that maybe I am not
setting properly?

Thanks for all your help!

"Myriam" wrote:

Thanks. I'll try that tomorrow when I get to the network. I'll post back the
results.

"Dave Peterson" wrote:

This is just a guess--I don't have access to a network.

But maybe you could add a line

DoEvents

right before the line that says to go get another filename.

If that doesn't help, you may want to post the code. Maybe someone on a network
can test it and come up with a better solution.




Myriam wrote:

I have been using Dave Peterson's code to retrieve directories. I did add the
application.volatile to recalculate/update the list. It works perfect in my
C drive.
However, when I am in a net, and retrieving dir from a server it gets
somewhat "confused". What I am thinking is that it takes a few more seconds
to retrieve the info from the net and the list does not get updated until I
close and open the form again.

Could you please help me one more time? How can I refresh it without closing
the form?

Thanks!

--

Dave Peterson



--

Dave Peterson


Myriam

Dir () code -- Dave Peterson
 

I will research further and if I find a solution I'll post it and let you
know. Thanks for all your help.

"Dave Peterson" wrote:

I don't have a guess (and I don't have access to a network to test).

Sorry.



Myriam wrote:

I tried DoEvents and it did not help.
The problems arises in late afternoon, I guess backing up server messes up
the connections (?). During the day, and only sometimes, the list box
displaying the files shrinks to one line only. ( I gave it enough space to
display 4 files at a time).This happens when I run the program in the network
(again in my C drive is perfect). Is there a property that maybe I am not
setting properly?

Thanks for all your help!

"Myriam" wrote:

Thanks. I'll try that tomorrow when I get to the network. I'll post back the
results.

"Dave Peterson" wrote:

This is just a guess--I don't have access to a network.

But maybe you could add a line

DoEvents

right before the line that says to go get another filename.

If that doesn't help, you may want to post the code. Maybe someone on a network
can test it and come up with a better solution.




Myriam wrote:

I have been using Dave Peterson's code to retrieve directories. I did add the
application.volatile to recalculate/update the list. It works perfect in my
C drive.
However, when I am in a net, and retrieving dir from a server it gets
somewhat "confused". What I am thinking is that it takes a few more seconds
to retrieve the info from the net and the list does not get updated until I
close and open the form again.

Could you please help me one more time? How can I refresh it without closing
the form?

Thanks!

--

Dave Peterson



--

Dave Peterson



Dave Peterson[_3_]

Dir () code -- Dave Peterson
 
There's another delaying function that you can play with:

See application.wait in VBA's help.

But I wouldn't put too much faith in it.

Myriam wrote:

I will research further and if I find a solution I'll post it and let you
know. Thanks for all your help.

"Dave Peterson" wrote:

I don't have a guess (and I don't have access to a network to test).

Sorry.



Myriam wrote:

I tried DoEvents and it did not help.
The problems arises in late afternoon, I guess backing up server messes up
the connections (?). During the day, and only sometimes, the list box
displaying the files shrinks to one line only. ( I gave it enough space to
display 4 files at a time).This happens when I run the program in the network
(again in my C drive is perfect). Is there a property that maybe I am not
setting properly?

Thanks for all your help!

"Myriam" wrote:

Thanks. I'll try that tomorrow when I get to the network. I'll post back the
results.

"Dave Peterson" wrote:

This is just a guess--I don't have access to a network.

But maybe you could add a line

DoEvents

right before the line that says to go get another filename.

If that doesn't help, you may want to post the code. Maybe someone on a network
can test it and come up with a better solution.




Myriam wrote:

I have been using Dave Peterson's code to retrieve directories. I did add the
application.volatile to recalculate/update the list. It works perfect in my
C drive.
However, when I am in a net, and retrieving dir from a server it gets
somewhat "confused". What I am thinking is that it takes a few more seconds
to retrieve the info from the net and the list does not get updated until I
close and open the form again.

Could you please help me one more time? How can I refresh it without closing
the form?

Thanks!

--

Dave Peterson



--

Dave Peterson



--

Dave Peterson


Myriam

Dir () code -- Dave Peterson
 
Thanks. I just saw your posting today 8/17. It might just work.

"Dave Peterson" wrote:

There's another delaying function that you can play with:

See application.wait in VBA's help.

But I wouldn't put too much faith in it.

Myriam wrote:

I will research further and if I find a solution I'll post it and let you
know. Thanks for all your help.

"Dave Peterson" wrote:

I don't have a guess (and I don't have access to a network to test).

Sorry.



Myriam wrote:

I tried DoEvents and it did not help.
The problems arises in late afternoon, I guess backing up server messes up
the connections (?). During the day, and only sometimes, the list box
displaying the files shrinks to one line only. ( I gave it enough space to
display 4 files at a time).This happens when I run the program in the network
(again in my C drive is perfect). Is there a property that maybe I am not
setting properly?

Thanks for all your help!

"Myriam" wrote:

Thanks. I'll try that tomorrow when I get to the network. I'll post back the
results.

"Dave Peterson" wrote:

This is just a guess--I don't have access to a network.

But maybe you could add a line

DoEvents

right before the line that says to go get another filename.

If that doesn't help, you may want to post the code. Maybe someone on a network
can test it and come up with a better solution.




Myriam wrote:

I have been using Dave Peterson's code to retrieve directories. I did add the
application.volatile to recalculate/update the list. It works perfect in my
C drive.
However, when I am in a net, and retrieving dir from a server it gets
somewhat "confused". What I am thinking is that it takes a few more seconds
to retrieve the info from the net and the list does not get updated until I
close and open the form again.

Could you please help me one more time? How can I refresh it without closing
the form?

Thanks!

--

Dave Peterson



--

Dave Peterson



--

Dave Peterson




All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com