ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   using namespaces in an excel macro. (https://www.excelbanter.com/excel-programming/419349-using-namespaces-excel-macro.html)

David

using namespaces in an excel macro.
 
Hi all,
I've written a small piece of code in vb.net using
system.io.filesystemwatcher namespace and it works fine.

Dim Watcher As System.IO.FileSystemWatcher
Watcher = New System.IO.FileSystemWatcher("C:\Documents and
Settings\dpharris\Desktop\dump", "tmp.txt")
..
..

The code runs fine. However when I copy this code to an excel macro it says
"user defined type not defined" (for the first line). I've tried adding a
reference to System.dll under references but it doesn't work. How do I re-use
this code ?

Thanks.
-david.


All times are GMT +1. The time now is 05:15 PM.

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