Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can you call VBScript code from VBA?
The following Code stored in a text file with a .VBS extension calls in the
file details I want to access and eventually update. The file detail I am trying to change is "Track Number" (for music files recorded from a CD) the FileSystemObject does not return this item in its structure. The script works by dragging and dropping a folder onto the .VBS icon. It was writing the data out to a text file (the code for that was snipped-out). How do I modify the code so that I can pass the folder in as string data. Set objShell = CreateObject("Shell.Application") Set Ag=Wscript.Arguments Set Fldr=objShell.NameSpace(Ag(0)) Set FldrItems=Fldr.Items ' shows the heading names... up to 50 of them For x = 0 to 50 t1 = t1 & Fldr.GetDetailsOf(vbnull, x) & vbtab Next ts.write FLDR.self.path &vbcrlf ts.Write T1 & vbcrlf T1="" 'shows the data stored in each of the file's details For Each FldrItem in FldrItems For x = 0 to 50 t1 = t1 & Fldr.GetDetailsOf(FldrItem, x) & vbtab Next Next ********* Is there some way to have the fso return ALL file details? I could use it, but so far namespace is the only method I have found that can get me to the specific data I want to see/update. And I run almost all my code from Excel-VBA. (im still very new to VB and scripting) -- Regards, John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how can i call sub or function in vba code | Excel Discussion (Misc queries) | |||
How do I call a method in VB from Excel with JUST code? | Excel Programming | |||
How do I call a method in VB from Excel with JUST code? | Excel Programming | |||
VBScript code behind Excel | Excel Programming | |||
call VBA compiled code within vba | Excel Programming |