R
rebelscum0000
Dear all
Windows XP W/SP2, Access 2003 W/SP3
How do I inform to the user that there is not media in the Drive in
browse mode AND which kind of media the user has to insert?
Insert Disk Media, CD, DVD or USB...
Please insert a disk, Media, CD, DVD into drive <Drive>:.
For example the user Select Drive (X, There is not CD into the
Drive..
My Code only ends.. I want to inform user There is not CD into the
Drive, like when the user Click on 31/2 Floppy (A
I do not want to call Dir(Drive & ":\*.*")
If there any API, which inform the user
That there is not media, In the X Drive and what kind of Media, the
user has to insert (CD, DVD. Memory Card, USB...)
I.e.
Insert CD
[Icon] Please insert a CD into Drive X:.
[Cancel]
I know the error value is either 75 or 76 then it means that the path
is not found or the drive is not ready
Another problem I have is when the user select A: and there is not
disk
I click on Cancel, the Msgbox close but not my Browse window, how do I
close it?
insert disk
[Icon] Please insert a disk into Drive A:.
[Cancel]
Finally, I want to use an icon from %SystemRoot%\system32\SHELL32.dll
To use in one of these icons in my Msgbox but I do not know how to
extract it any idea?
Thanks in advance
Regards,
Antonio Macias
My code:
Dim MyDlg As New DialogClass 'Common Dialogs Class Module for Access
and VBA
Dim MyDialogResponse As Integer
Dim GetFolder As String
Dim strDrive As String
Dim FirstFolder As String
Dim LastFolder As String
Dim vArr As Variant
Dim itemCount As Integer
Dim j As Integer
Dim strItems As String
Dim TempCRCFile As String
Dim TempTXTFile As String
Dim ccgFF As Integer
Dim egfFF As Integer
Dim amcFF As Integer
Dim newDirectory As String
'On Error GoTo ErrorHandling
'GoTo Replace_First_Process:
'GoTo Replace_Second_Process:
'GoTo Fix_FileExtensions:
'Start Event Open_Windows_Browse
'Opens the Browse Dialog
With MyDlg
.TypeFile = 0 'All file Types
.TypeFile = 4 'Text Files
.DialogType = "Browse"
End With
'Show the select type of dialog selected with the properties
desired
MyDlg.Show
'Waits for the user to click a button, and returns an Integer
indicating which button
'the user clicked .DialogType = "Browse"
MyDialogResponse = Len(MyDlg.ReturnFilePath)
If MyDialogResponse = 0 Then
'User chose Cancel.
MsgBox "User Cancelled", vbExclamation, "Browse"
End
Else
'User Chose OK.
End If
'The name for the chosen file or directory
'Drive>:\ OR <Drive>:\Folder OR <Drive>:\Folder\Folder..
GetFolder = MyDlg.ReturnFilePath
Debug.Print "GetFolder = " & GetFolder
Windows XP W/SP2, Access 2003 W/SP3
How do I inform to the user that there is not media in the Drive in
browse mode AND which kind of media the user has to insert?
Insert Disk Media, CD, DVD or USB...
Please insert a disk, Media, CD, DVD into drive <Drive>:.
For example the user Select Drive (X, There is not CD into the
Drive..
My Code only ends.. I want to inform user There is not CD into the
Drive, like when the user Click on 31/2 Floppy (A
I do not want to call Dir(Drive & ":\*.*")
If there any API, which inform the user
That there is not media, In the X Drive and what kind of Media, the
user has to insert (CD, DVD. Memory Card, USB...)
I.e.
Insert CD
[Icon] Please insert a CD into Drive X:.
[Cancel]
I know the error value is either 75 or 76 then it means that the path
is not found or the drive is not ready
Another problem I have is when the user select A: and there is not
disk
I click on Cancel, the Msgbox close but not my Browse window, how do I
close it?
insert disk
[Icon] Please insert a disk into Drive A:.
[Cancel]
Finally, I want to use an icon from %SystemRoot%\system32\SHELL32.dll
To use in one of these icons in my Msgbox but I do not know how to
extract it any idea?
Thanks in advance
Regards,
Antonio Macias
My code:
Dim MyDlg As New DialogClass 'Common Dialogs Class Module for Access
and VBA
Dim MyDialogResponse As Integer
Dim GetFolder As String
Dim strDrive As String
Dim FirstFolder As String
Dim LastFolder As String
Dim vArr As Variant
Dim itemCount As Integer
Dim j As Integer
Dim strItems As String
Dim TempCRCFile As String
Dim TempTXTFile As String
Dim ccgFF As Integer
Dim egfFF As Integer
Dim amcFF As Integer
Dim newDirectory As String
'On Error GoTo ErrorHandling
'GoTo Replace_First_Process:
'GoTo Replace_Second_Process:
'GoTo Fix_FileExtensions:
'Start Event Open_Windows_Browse
'Opens the Browse Dialog
With MyDlg
.TypeFile = 0 'All file Types
.TypeFile = 4 'Text Files
.DialogType = "Browse"
End With
'Show the select type of dialog selected with the properties
desired
MyDlg.Show
'Waits for the user to click a button, and returns an Integer
indicating which button
'the user clicked .DialogType = "Browse"
MyDialogResponse = Len(MyDlg.ReturnFilePath)
If MyDialogResponse = 0 Then
'User chose Cancel.
MsgBox "User Cancelled", vbExclamation, "Browse"
End
Else
'User Chose OK.
End If
'The name for the chosen file or directory
'Drive>:\ OR <Drive>:\Folder OR <Drive>:\Folder\Folder..
GetFolder = MyDlg.ReturnFilePath
Debug.Print "GetFolder = " & GetFolder