View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ion ion is offline
external usenet poster
 
Posts: 12
Default IWshRuntimeLibrary.WshShell.SpecialFolders requires a variant argument

This was hard to debug.
Dim bulb as new IWshRuntimeLibrary.WshShell
dim str as string, var as variant
str = "MyDocuments"
var = str
Debug.print bulb.SpecialFolders(str) ' prints the all users desktop
Debug.print bulb.SpecialFolders(var) ' prints the My Documents folder