473,395 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

InvalidEnumArgumentsException Error <Help Requested>



invalidEnumArgumentException error during run-time, it builds OK...didn't
like when I added fileio.uicanceloption.throwExceptions

any ideas..?

thanks in advance!!

Try

FileIO.FileSystem.DeleteDirectory(strLocString,
FileIO.DeleteDirectoryOption.DeleteAllContents,
FileIO.UICancelOption.ThrowException)

Catch e As System.IO.IOException
MessageBox.Show("Error deleteing " & strLocString & " directory"
& ControlChars.CrLf & e.Message, " Error In Creation")
End Try
Jun 9 '07 #1
1 1510


"magellan" <ma******@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
>

invalidEnumArgumentException error during run-time, it builds OK...didn't
like when I added fileio.uicanceloption.throwExceptions

any ideas..?

thanks in advance!!

Try

FileIO.FileSystem.DeleteDirectory(strLocString,
FileIO.DeleteDirectoryOption.DeleteAllContents,
FileIO.UICancelOption.ThrowException)

Catch e As System.IO.IOException
MessageBox.Show("Error deleteing " & strLocString & "
directory"
& ControlChars.CrLf & e.Message, " Error In Creation")
End Try
You are passing the wrong enumeration value for the third parameter of
DeleteDirectory. DeleteDirectory has 3 overloads:

DeleteDirectory(String, DeleteDirectoryOption)
DeleteDirectory(String, UIOption, RecycleOption)
DeleteDirectory(String, UIOption, RecycleOption, UICancelOption)

If you want to make use of the UICancelOption parameter, you'll have to call
the 3rd overload by passing all four parameters (directory, showUI, recycle,
and onUserCancel).

HTH,
Mythran
Jun 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: da Vinci | last post by:
OK, this has got to be a simple one and yet I cannot find the answer in my textbook. How can I get a simple pause after an output line, that simply waits for any key to be pressed to move on? ...
4
by: Chuck | last post by:
Hello, I have an Access XP database that has several fields. One of the fields is a text field and has an account number that is preceeded by a text character, like: F102354. Every account...
1
by: Chuck | last post by:
I have a question tht I'm sure someone out there can answer. A friend of mine has developed an Access application that is a very business specific (niche type of application). The application...
1
by: Chuck | last post by:
I have a query that uses the query with the critera set to . We I run the query the msgbox pops up asking for the name information to be entered, but on the top (blue background) of the message box...
0
by: Chuck | last post by:
Can someone let me know the name of a companies that provide first tier support. I have an Access application that I have sold to 12 companies here in the area and I was thinking about selling...
1
by: Chuck | last post by:
I appreciate any help!!! I have an application that has 4 different forms that display the same information except for the fact that they are fed from 4 different parameter queries. The 4...
1
by: WØCBF | last post by:
I have an Access application that was written in ver 2002. I have distributed the application to our other offices using the Developers Toolkit and installed a runtime version of Access. At that...
2
by: V e X y N | last post by:
OK, here's the deal, if anyone could help me with a link or two, I'd be delighted. I'm just learning C (I learned over the summer, so a few months), and I was wondering what (*free*) compilers are...
1
by: WØCBF | last post by:
Greetings, I have a form that is bound to a table that has about 15 fields in it and all of the fields are displayed on the main form. I have 4 fields that will be updated and I want to write...
2
by: WØCBF | last post by:
I am trying to copy the information from a form into a table. I have tried running the sql code from a macro by using the command : This works and writes the work 'test' into the field name...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.