A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Treeview missing icons



 
 
Thread Tools Display Modes
  #1  
Old October 5th, 2006, 10:45 PM posted to microsoft.public.access.forms
Barry Gilbert
external usenet poster
 
Posts: 379
Default Treeview missing icons

I have code that finds Excel files in a folder and fills a TreeView control.
It looks like this:

Set fso = New Scripting.FileSystemObject
If fso.FolderExists(path) Then ' path is passed into this function.
Set fldr = fso.GetFolder(path)
strFileFound = Dir(fso.BuildPath(fldr.path, "*.xls"))
Do While Len(strFileFound) 0
' Excel files are named like this: D1.HBU.Print.xls
' Extract the first part...
strProdCode = Left$(strFileFound, InStr(1, strFileFound, ".") - 1)
Me.tvwSetupSheets.Nodes.Add parentNode, tvwChild,
fso.BuildPath(path, strFileFound), strProdCode, "excel" ' This is an icon
in an ImageList control.
strFileFound = Dir()
Loop
Else

This work fine on most machines. However, I have one user for whom this
doesn't work. When this runs, it seems to create a node for each file, but
uses the folder icon instead of the excel icon and doesn't display the parsed
file name. It doesn't throw an error.

I've confirmed that the ActiveX controls are correctly installed and
registered on his machine and that he has rights to the folder.

He's running Access 2000 on WinXP Pro. I've tested this on other machines
with the same configuration and they seem to work.

Any suggestions are appreciated.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.