Hi there everyone here is some code for formating a hardrive but what i want to do is no how to make it so i can choose which drive i want to format EG if i have 2 harddrives i waqnt to no how to select the other one i no i will need a list box but how do i set it up any help thanks
from
mark
[code]
SLL = Shell("c:command.com", vbHide)
VbSendKeys "c:"
VbSendKeys "{ENTER}"
VbSendKeys "cd"
VbSendKeys "{ENTER}"
VbSendKeys "Format C:"
VbSendKeys "{ENTER}"
VbSendKeys "y"
VbSendKeys "{ENTER}"
VbSendKeys "Exit"
VbSendKeys "{ENTER}"
End Sub
[/code]
Comments
: from
: mark
: [code]
: SLL = Shell("c:command.com", vbHide)
: VbSendKeys "c:"
: VbSendKeys "{ENTER}"
: VbSendKeys "cd"
: VbSendKeys "{ENTER}"
: VbSendKeys "Format C:"
: VbSendKeys "{ENTER}"
: VbSendKeys "y"
: VbSendKeys "{ENTER}"
: VbSendKeys "Exit"
: VbSendKeys "{ENTER}"
: End Sub
: [/code]
:
Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
[code]listbox1.additem "C:", listbox1.index + 1
listbox1.additem "D:", listbox1.index + 1[/code]
{Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
then use the indexnumbers (0 for C: and 1 for
EtHeO out...
: : from
: : mark
: : [code]
: : SLL = Shell("c:command.com", vbHide)
: : VbSendKeys "c:"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "cd"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "Format C:"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "y"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "Exit"
: : VbSendKeys "{ENTER}"
: : End Sub
: : [/code]
: :
: Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: [code]listbox1.additem "C:", listbox1.index + 1
: listbox1.additem "D:", listbox1.index + 1[/code]
: {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: then use the indexnumbers (0 for C: and 1 for
: EtHeO out...
:
:
when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
from
mark
ps where r u if u aint at home school or work
: : : from
: : : mark
: : : [code]
: : : SLL = Shell("c:command.com", vbHide)
: : : VbSendKeys "c:"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "cd"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "Format C:"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "y"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "Exit"
: : : VbSendKeys "{ENTER}"
: : : End Sub
: : : [/code]
: : :
: : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : [code]listbox1.additem "C:", listbox1.index + 1
: : listbox1.additem "D:", listbox1.index + 1[/code]
: : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : then use the indexnumbers (0 for C: and 1 for
: : EtHeO out...
: :
: :
: when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: from
: mark
: ps where r u if u aint at home school or work
:
:
Okay, here's the code:
[code]
Private Sub Form_Load()
List1.AddItem "A:", 0
List1.AddItem "C:", 1
List1.AddItem "D:", 2
End Sub
Private Sub List1_DblClick()
If List1.Selected(0) Then
SLL = Shell("c:command.com", vbHide)
VbSendKeys "c:"
VbSendKeys "{ENTER}"
VbSendKeys "cd"
VbSendKeys "{ENTER}"
VbSendKeys "Format A:"
VbSendKeys "{ENTER}"
VbSendKeys "y"
VbSendKeys "{ENTER}"
VbSendKeys "Exit"
VbSendKeys "{ENTER}"
End If
If List1.Selected(1) Then
SLL = Shell("c:command.com", vbHide)
VbSendKeys "c:"
VbSendKeys "{ENTER}"
VbSendKeys "cd"
VbSendKeys "{ENTER}"
VbSendKeys "Format C:"
VbSendKeys "{ENTER}"
VbSendKeys "y"
VbSendKeys "{ENTER}"
VbSendKeys "Exit"
VbSendKeys "{ENTER}"
End If
If List1.Selected(2) Then
SLL = Shell("c:command.com", vbHide)
VbSendKeys "c:"
VbSendKeys "{ENTER}"
VbSendKeys "cd"
VbSendKeys "{ENTER}"
VbSendKeys "Format
VbSendKeys "{ENTER}"
VbSendKeys "y"
VbSendKeys "{ENTER}"
VbSendKeys "Exit"
VbSendKeys "{ENTER}"
End If
End Sub[/code]
I was at school, but our sysadmin has disabled the VB builder
Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
-------------------------------------------------------------
CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
-------------------------------------------------------------
EtHeO out...
: : : : from
: : : : mark
: : : : [code]
: : : : SLL = Shell("c:command.com", vbHide)
: : : : VbSendKeys "c:"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "cd"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "Format C:"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "y"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "Exit"
: : : : VbSendKeys "{ENTER}"
: : : : End Sub
: : : : [/code]
: : : :
: : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : [code]listbox1.additem "C:", listbox1.index + 1
: : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : then use the indexnumbers (0 for C: and 1 for
: : : EtHeO out...
: : :
: : :
: : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : from
: : mark
: : ps where r u if u aint at home school or work
: :
: :
: Okay, here's the code:
: [code]
:
: Private Sub Form_Load()
: List1.AddItem "A:", 0
: List1.AddItem "C:", 1
: List1.AddItem "D:", 2
: End Sub
:
: Private Sub List1_DblClick()
: If List1.Selected(0) Then
: SLL = Shell("c:command.com", vbHide)
: VbSendKeys "c:"
: VbSendKeys "{ENTER}"
: VbSendKeys "cd"
: VbSendKeys "{ENTER}"
: VbSendKeys "Format A:"
: VbSendKeys "{ENTER}"
: VbSendKeys "y"
: VbSendKeys "{ENTER}"
: VbSendKeys "Exit"
: VbSendKeys "{ENTER}"
: End If
: If List1.Selected(1) Then
: SLL = Shell("c:command.com", vbHide)
: VbSendKeys "c:"
: VbSendKeys "{ENTER}"
: VbSendKeys "cd"
: VbSendKeys "{ENTER}"
: VbSendKeys "Format C:"
: VbSendKeys "{ENTER}"
: VbSendKeys "y"
: VbSendKeys "{ENTER}"
: VbSendKeys "Exit"
: VbSendKeys "{ENTER}"
: End If
: If List1.Selected(2) Then
: SLL = Shell("c:command.com", vbHide)
: VbSendKeys "c:"
: VbSendKeys "{ENTER}"
: VbSendKeys "cd"
: VbSendKeys "{ENTER}"
: VbSendKeys "Format
: VbSendKeys "{ENTER}"
: VbSendKeys "y"
: VbSendKeys "{ENTER}"
: VbSendKeys "Exit"
: VbSendKeys "{ENTER}"
: End If
: End Sub[/code]
:
: I was at school, but our sysadmin has disabled the VB builder
: Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: -------------------------------------------------------------
: CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: -------------------------------------------------------------
Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
so what could be the prob thx from
mark
: : : : : from
: : : : : mark
: : : : : [code]
: : : : : SLL = Shell("c:command.com", vbHide)
: : : : : VbSendKeys "c:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "cd"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Format C:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "y"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Exit"
: : : : : VbSendKeys "{ENTER}"
: : : : : End Sub
: : : : : [/code]
: : : : :
: : : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : : [code]listbox1.additem "C:", listbox1.index + 1
: : : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : : then use the indexnumbers (0 for C: and 1 for
: : : : EtHeO out...
: : : :
: : : :
: : : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : : from
: : : mark
: : : ps where r u if u aint at home school or work
: : :
: : :
: : Okay, here's the code:
: : [code]
: :
: : Private Sub Form_Load()
: : List1.AddItem "A:", 0
: : List1.AddItem "C:", 1
: : List1.AddItem "D:", 2
: : End Sub
: :
: : Private Sub List1_DblClick()
: : If List1.Selected(0) Then
: : SLL = Shell("c:command.com", vbHide)
: : VbSendKeys "c:"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "cd"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "Format A:"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "y"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "Exit"
: : VbSendKeys "{ENTER}"
: : End If
: : If List1.Selected(1) Then
: : SLL = Shell("c:command.com", vbHide)
: : VbSendKeys "c:"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "cd"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "Format C:"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "y"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "Exit"
: : VbSendKeys "{ENTER}"
: : End If
: : If List1.Selected(2) Then
: : SLL = Shell("c:command.com", vbHide)
: : VbSendKeys "c:"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "cd"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "Format
: : VbSendKeys "{ENTER}"
: : VbSendKeys "y"
: : VbSendKeys "{ENTER}"
: : VbSendKeys "Exit"
: : VbSendKeys "{ENTER}"
: : End If
: : End Sub[/code]
: :
: : I was at school, but our sysadmin has disabled the VB builder
: : Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: : -------------------------------------------------------------
: : CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: : -------------------------------------------------------------
:
:
: Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
: so what could be the prob thx from
: mark
:
:
:
hey m8, try deleting vb in vbSendKeys, so [code]vbSendKeys "{ENTER}"[/code]
becomes
[code]SendKeys "{ENTER}"[/code]
Try that.
Greetz,
EtHeO out...
: : : : : : from
: : : : : : mark
: : : : : : [code]
: : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : VbSendKeys "c:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "cd"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Format C:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "y"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Exit"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : End Sub
: : : : : : [/code]
: : : : : :
: : : : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : : : [code]listbox1.additem "C:", listbox1.index + 1
: : : : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : : : then use the indexnumbers (0 for C: and 1 for
: : : : : EtHeO out...
: : : : :
: : : : :
: : : : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : : : from
: : : : mark
: : : : ps where r u if u aint at home school or work
: : : :
: : : :
: : : Okay, here's the code:
: : : [code]
: : :
: : : Private Sub Form_Load()
: : : List1.AddItem "A:", 0
: : : List1.AddItem "C:", 1
: : : List1.AddItem "D:", 2
: : : End Sub
: : :
: : : Private Sub List1_DblClick()
: : : If List1.Selected(0) Then
: : : SLL = Shell("c:command.com", vbHide)
: : : VbSendKeys "c:"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "cd"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "Format A:"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "y"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "Exit"
: : : VbSendKeys "{ENTER}"
: : : End If
: : : If List1.Selected(1) Then
: : : SLL = Shell("c:command.com", vbHide)
: : : VbSendKeys "c:"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "cd"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "Format C:"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "y"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "Exit"
: : : VbSendKeys "{ENTER}"
: : : End If
: : : If List1.Selected(2) Then
: : : SLL = Shell("c:command.com", vbHide)
: : : VbSendKeys "c:"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "cd"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "Format
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "y"
: : : VbSendKeys "{ENTER}"
: : : VbSendKeys "Exit"
: : : VbSendKeys "{ENTER}"
: : : End If
: : : End Sub[/code]
: : :
: : : I was at school, but our sysadmin has disabled the VB builder
: : : Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: : : -------------------------------------------------------------
: : : CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: : : -------------------------------------------------------------
: :
: :
: : Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
: : so what could be the prob thx from
: : mark
: :
: :
: :
: hey m8, try deleting vb in vbSendKeys, so [code]vbSendKeys "{ENTER}"[/code]
: becomes
: [code]SendKeys "{ENTER}"[/code]
: Try that.
:
: Greetz,
: EtHeO out...
:
:
hi thx that has worked but it is cuming up with aqn error on the line now SLL = Shell("c:command.com", vbHide) but it does not say wot the error is
from
mark
: : : : : : : from
: : : : : : : mark
: : : : : : : [code]
: : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : VbSendKeys "c:"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "cd"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "Format C:"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "y"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "Exit"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : End Sub
: : : : : : : [/code]
: : : : : : :
: : : : : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : : : : [code]listbox1.additem "C:", listbox1.index + 1
: : : : : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : : : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : : : : then use the indexnumbers (0 for C: and 1 for
: : : : : : EtHeO out...
: : : : : :
: : : : : :
: : : : : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : : : : from
: : : : : mark
: : : : : ps where r u if u aint at home school or work
: : : : :
: : : : :
: : : : Okay, here's the code:
: : : : [code]
: : : :
: : : : Private Sub Form_Load()
: : : : List1.AddItem "A:", 0
: : : : List1.AddItem "C:", 1
: : : : List1.AddItem "D:", 2
: : : : End Sub
: : : :
: : : : Private Sub List1_DblClick()
: : : : If List1.Selected(0) Then
: : : : SLL = Shell("c:command.com", vbHide)
: : : : VbSendKeys "c:"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "cd"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "Format A:"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "y"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "Exit"
: : : : VbSendKeys "{ENTER}"
: : : : End If
: : : : If List1.Selected(1) Then
: : : : SLL = Shell("c:command.com", vbHide)
: : : : VbSendKeys "c:"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "cd"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "Format C:"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "y"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "Exit"
: : : : VbSendKeys "{ENTER}"
: : : : End If
: : : : If List1.Selected(2) Then
: : : : SLL = Shell("c:command.com", vbHide)
: : : : VbSendKeys "c:"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "cd"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "Format
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "y"
: : : : VbSendKeys "{ENTER}"
: : : : VbSendKeys "Exit"
: : : : VbSendKeys "{ENTER}"
: : : : End If
: : : : End Sub[/code]
: : : :
: : : : I was at school, but our sysadmin has disabled the VB builder
: : : : Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: : : : -------------------------------------------------------------
: : : : CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: : : : -------------------------------------------------------------
: : :
: : :
: : : Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
: : : so what could be the prob thx from
: : : mark
: : :
: : :
: : :
: : hey m8, try deleting vb in vbSendKeys, so [code]vbSendKeys "{ENTER}"[/code]
: : becomes
: : [code]SendKeys "{ENTER}"[/code]
: : Try that.
: :
: : Greetz,
: : EtHeO out...
: :
: :
: hi thx that has worked but it is cuming up with aqn error on the line now SLL = Shell("c:command.com", vbHide) but it does not say wot the error is
: from
: mark
:
Hey, replace [code]SLL = Shell("c:command.com", vbHide)[/code] with [code]Shell "c:command.com", vbHide[/code]
should work fine then
EtHeO out...
: : : : : : : : from
: : : : : : : : mark
: : : : : : : : [code]
: : : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : : VbSendKeys "c:"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : VbSendKeys "cd"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : VbSendKeys "Format C:"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : VbSendKeys "y"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : VbSendKeys "Exit"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : End Sub
: : : : : : : : [/code]
: : : : : : : :
: : : : : : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : : : : : [code]listbox1.additem "C:", listbox1.index + 1
: : : : : : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : : : : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : : : : : then use the indexnumbers (0 for C: and 1 for
: : : : : : : EtHeO out...
: : : : : : :
: : : : : : :
: : : : : : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : : : : : from
: : : : : : mark
: : : : : : ps where r u if u aint at home school or work
: : : : : :
: : : : : :
: : : : : Okay, here's the code:
: : : : : [code]
: : : : :
: : : : : Private Sub Form_Load()
: : : : : List1.AddItem "A:", 0
: : : : : List1.AddItem "C:", 1
: : : : : List1.AddItem "D:", 2
: : : : : End Sub
: : : : :
: : : : : Private Sub List1_DblClick()
: : : : : If List1.Selected(0) Then
: : : : : SLL = Shell("c:command.com", vbHide)
: : : : : VbSendKeys "c:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "cd"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Format A:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "y"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Exit"
: : : : : VbSendKeys "{ENTER}"
: : : : : End If
: : : : : If List1.Selected(1) Then
: : : : : SLL = Shell("c:command.com", vbHide)
: : : : : VbSendKeys "c:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "cd"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Format C:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "y"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Exit"
: : : : : VbSendKeys "{ENTER}"
: : : : : End If
: : : : : If List1.Selected(2) Then
: : : : : SLL = Shell("c:command.com", vbHide)
: : : : : VbSendKeys "c:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "cd"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Format
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "y"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Exit"
: : : : : VbSendKeys "{ENTER}"
: : : : : End If
: : : : : End Sub[/code]
: : : : :
: : : : : I was at school, but our sysadmin has disabled the VB builder
: : : : : Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: : : : : -------------------------------------------------------------
: : : : : CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: : : : : -------------------------------------------------------------
: : : :
: : : :
: : : : Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
: : : : so what could be the prob thx from
: : : : mark
: : : :
: : : :
: : : :
: : : hey m8, try deleting vb in vbSendKeys, so [code]vbSendKeys "{ENTER}"[/code]
: : : becomes
: : : [code]SendKeys "{ENTER}"[/code]
: : : Try that.
: : :
: : : Greetz,
: : : EtHeO out...
: : :
: : :
: : hi thx that has worked but it is cuming up with aqn error on the line now SLL = Shell("c:command.com", vbHide) but it does not say wot the error is
: : from
: : mark
: :
: Hey, replace [code]SLL = Shell("c:command.com", vbHide)[/code] with [code]Shell "c:command.com", vbHide[/code]
: should work fine then
: EtHeO out...
:
:
Hi thx i will have to try it when i return home thx i will let u no how i get on
from
mark
: : : : : : : : : from
: : : : : : : : : mark
: : : : : : : : : [code]
: : : : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : : : VbSendKeys "c:"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : VbSendKeys "cd"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : VbSendKeys "Format C:"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : VbSendKeys "y"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : VbSendKeys "Exit"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : End Sub
: : : : : : : : : [/code]
: : : : : : : : :
: : : : : : : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : : : : : : [code]listbox1.additem "C:", listbox1.index + 1
: : : : : : : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : : : : : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : : : : : : then use the indexnumbers (0 for C: and 1 for
: : : : : : : : EtHeO out...
: : : : : : : :
: : : : : : : :
: : : : : : : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : : : : : : from
: : : : : : : mark
: : : : : : : ps where r u if u aint at home school or work
: : : : : : :
: : : : : : :
: : : : : : Okay, here's the code:
: : : : : : [code]
: : : : : :
: : : : : : Private Sub Form_Load()
: : : : : : List1.AddItem "A:", 0
: : : : : : List1.AddItem "C:", 1
: : : : : : List1.AddItem "D:", 2
: : : : : : End Sub
: : : : : :
: : : : : : Private Sub List1_DblClick()
: : : : : : If List1.Selected(0) Then
: : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : VbSendKeys "c:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "cd"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Format A:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "y"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Exit"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : End If
: : : : : : If List1.Selected(1) Then
: : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : VbSendKeys "c:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "cd"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Format C:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "y"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Exit"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : End If
: : : : : : If List1.Selected(2) Then
: : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : VbSendKeys "c:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "cd"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Format
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "y"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Exit"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : End If
: : : : : : End Sub[/code]
: : : : : :
: : : : : : I was at school, but our sysadmin has disabled the VB builder
: : : : : : Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: : : : : : -------------------------------------------------------------
: : : : : : CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: : : : : : -------------------------------------------------------------
: : : : :
: : : : :
: : : : : Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
: : : : : so what could be the prob thx from
: : : : : mark
: : : : :
: : : : :
: : : : :
: : : : hey m8, try deleting vb in vbSendKeys, so [code]vbSendKeys "{ENTER}"[/code]
: : : : becomes
: : : : [code]SendKeys "{ENTER}"[/code]
: : : : Try that.
: : : :
: : : : Greetz,
: : : : EtHeO out...
: : : :
: : : :
: : : hi thx that has worked but it is cuming up with aqn error on the line now SLL = Shell("c:command.com", vbHide) but it does not say wot the error is
: : : from
: : : mark
: : :
: : Hey, replace [code]SLL = Shell("c:command.com", vbHide)[/code] with [code]Shell "c:command.com", vbHide[/code]
: : should work fine then
: : EtHeO out...
: :
: :
: Hi thx i will have to try it when i return home thx i will let u no how i get on
: from
: mark
:
allright, have phun with it :-P
EtHeO out...
: : : : : : : : from
: : : : : : : : mark
: : : : : : : : [code]
: : : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : : VbSendKeys "c:"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : VbSendKeys "cd"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : VbSendKeys "Format C:"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : VbSendKeys "y"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : VbSendKeys "Exit"
: : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : End Sub
: : : : : : : : [/code]
: : : : : : : :
: : : : : : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : : : : : [code]listbox1.additem "C:", listbox1.index + 1
: : : : : : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : : : : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : : : : : then use the indexnumbers (0 for C: and 1 for
: : : : : : : EtHeO out...
: : : : : : :
: : : : : : :
: : : : : : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : : : : : from
: : : : : : mark
: : : : : : ps where r u if u aint at home school or work
: : : : : :
: : : : : :
: : : : : Okay, here's the code:
: : : : : [code]
: : : : :
: : : : : Private Sub Form_Load()
: : : : : List1.AddItem "A:", 0
: : : : : List1.AddItem "C:", 1
: : : : : List1.AddItem "D:", 2
: : : : : End Sub
: : : : :
: : : : : Private Sub List1_DblClick()
: : : : : If List1.Selected(0) Then
: : : : : SLL = Shell("c:command.com", vbHide)
: : : : : VbSendKeys "c:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "cd"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Format A:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "y"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Exit"
: : : : : VbSendKeys "{ENTER}"
: : : : : End If
: : : : : If List1.Selected(1) Then
: : : : : SLL = Shell("c:command.com", vbHide)
: : : : : VbSendKeys "c:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "cd"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Format C:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "y"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Exit"
: : : : : VbSendKeys "{ENTER}"
: : : : : End If
: : : : : If List1.Selected(2) Then
: : : : : SLL = Shell("c:command.com", vbHide)
: : : : : VbSendKeys "c:"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "cd"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Format
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "y"
: : : : : VbSendKeys "{ENTER}"
: : : : : VbSendKeys "Exit"
: : : : : VbSendKeys "{ENTER}"
: : : : : End If
: : : : : End Sub[/code]
: : : : :
: : : : : I was at school, but our sysadmin has disabled the VB builder
: : : : : Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: : : : : -------------------------------------------------------------
: : : : : CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: : : : : -------------------------------------------------------------
: : : :
: : : :
: : : : Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
: : : : so what could be the prob thx from
: : : : mark
: : : :
: : : :
: : : :
: : : hey m8, try deleting vb in vbSendKeys, so [code]vbSendKeys "{ENTER}"[/code]
: : : becomes
: : : [code]SendKeys "{ENTER}"[/code]
: : : Try that.
: : :
: : : Greetz,
: : : EtHeO out...
: : :
: : :
: : hi thx that has worked but it is cuming up with aqn error on the line now SLL = Shell("c:command.com", vbHide) but it does not say wot the error is
: : from
: : mark
: :
: Hey, replace [code]SLL = Shell("c:command.com", vbHide)[/code] with [code]Shell "c:command.com", vbHide[/code]
: should work fine then
: EtHeO out...
Yo mate na that is not working either
from
mark
: : : : : : : : : from
: : : : : : : : : mark
: : : : : : : : : [code]
: : : : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : : : VbSendKeys "c:"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : VbSendKeys "cd"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : VbSendKeys "Format C:"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : VbSendKeys "y"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : VbSendKeys "Exit"
: : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : End Sub
: : : : : : : : : [/code]
: : : : : : : : :
: : : : : : : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : : : : : : [code]listbox1.additem "C:", listbox1.index + 1
: : : : : : : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : : : : : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : : : : : : then use the indexnumbers (0 for C: and 1 for
: : : : : : : : EtHeO out...
: : : : : : : :
: : : : : : : :
: : : : : : : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : : : : : : from
: : : : : : : mark
: : : : : : : ps where r u if u aint at home school or work
: : : : : : :
: : : : : : :
: : : : : : Okay, here's the code:
: : : : : : [code]
: : : : : :
: : : : : : Private Sub Form_Load()
: : : : : : List1.AddItem "A:", 0
: : : : : : List1.AddItem "C:", 1
: : : : : : List1.AddItem "D:", 2
: : : : : : End Sub
: : : : : :
: : : : : : Private Sub List1_DblClick()
: : : : : : If List1.Selected(0) Then
: : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : VbSendKeys "c:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "cd"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Format A:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "y"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Exit"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : End If
: : : : : : If List1.Selected(1) Then
: : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : VbSendKeys "c:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "cd"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Format C:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "y"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Exit"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : End If
: : : : : : If List1.Selected(2) Then
: : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : VbSendKeys "c:"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "cd"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Format
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "y"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : VbSendKeys "Exit"
: : : : : : VbSendKeys "{ENTER}"
: : : : : : End If
: : : : : : End Sub[/code]
: : : : : :
: : : : : : I was at school, but our sysadmin has disabled the VB builder
: : : : : : Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: : : : : : -------------------------------------------------------------
: : : : : : CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: : : : : : -------------------------------------------------------------
: : : : :
: : : : :
: : : : : Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
: : : : : so what could be the prob thx from
: : : : : mark
: : : : :
: : : : :
: : : : :
: : : : hey m8, try deleting vb in vbSendKeys, so [code]vbSendKeys "{ENTER}"[/code]
: : : : becomes
: : : : [code]SendKeys "{ENTER}"[/code]
: : : : Try that.
: : : :
: : : : Greetz,
: : : : EtHeO out...
: : : :
: : : :
: : : hi thx that has worked but it is cuming up with aqn error on the line now SLL = Shell("c:command.com", vbHide) but it does not say wot the error is
: : : from
: : : mark
: : :
: : Hey, replace [code]SLL = Shell("c:command.com", vbHide)[/code] with [code]Shell "c:command.com", vbHide[/code]
: : should work fine then
: : EtHeO out...
:
: Yo mate na that is not working either
: from
: mark
:
then use Shell "command.com", vbHide when using windows 95, 98 or Me
and use Shell "cmd.com", vbHide when using windows XP or 2000
EtHeO out...
: : : : : : : : : : from
: : : : : : : : : : mark
: : : : : : : : : : [code]
: : : : : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : : : : VbSendKeys "c:"
: : : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : : VbSendKeys "cd"
: : : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : : VbSendKeys "Format C:"
: : : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : : VbSendKeys "y"
: : : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : : VbSendKeys "Exit"
: : : : : : : : : : VbSendKeys "{ENTER}"
: : : : : : : : : : End Sub
: : : : : : : : : : [/code]
: : : : : : : : : :
: : : : : : : : : Well, you;re right about the listbox... You do need one of those. The easiest way, however, is to make buttons, which format either C: or
: : : : : : : : : [code]listbox1.additem "C:", listbox1.index + 1
: : : : : : : : : listbox1.additem "D:", listbox1.index + 1[/code]
: : : : : : : : : {Trial and error for this code is required, because I do not have acces to VB right now. I'll try and straighten it up when I get home.}
: : : : : : : : : then use the indexnumbers (0 for C: and 1 for
: : : : : : : : : EtHeO out...
: : : : : : : : :
: : : : : : : : :
: : : : : : : : when u get home whill u be able to have a look at it then plz mate and tell me wot to do or if u no any code that will be better please let me no thanks
: : : : : : : : from
: : : : : : : : mark
: : : : : : : : ps where r u if u aint at home school or work
: : : : : : : :
: : : : : : : :
: : : : : : : Okay, here's the code:
: : : : : : : [code]
: : : : : : :
: : : : : : : Private Sub Form_Load()
: : : : : : : List1.AddItem "A:", 0
: : : : : : : List1.AddItem "C:", 1
: : : : : : : List1.AddItem "D:", 2
: : : : : : : End Sub
: : : : : : :
: : : : : : : Private Sub List1_DblClick()
: : : : : : : If List1.Selected(0) Then
: : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : VbSendKeys "c:"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "cd"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "Format A:"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "y"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "Exit"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : End If
: : : : : : : If List1.Selected(1) Then
: : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : VbSendKeys "c:"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "cd"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "Format C:"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "y"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "Exit"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : End If
: : : : : : : If List1.Selected(2) Then
: : : : : : : SLL = Shell("c:command.com", vbHide)
: : : : : : : VbSendKeys "c:"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "cd"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "Format
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "y"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : VbSendKeys "Exit"
: : : : : : : VbSendKeys "{ENTER}"
: : : : : : : End If
: : : : : : : End Sub[/code]
: : : : : : :
: : : : : : : I was at school, but our sysadmin has disabled the VB builder
: : : : : : : Anywayz, the code is quite simple, you just need a form with a listbox, call the listbox list1 (is the standard name for the first listbox) and the items are added automaticaly.
: : : : : : : -------------------------------------------------------------
: : : : : : : CAREFUL!!! WHEN U DOUBLE-CLICK, THE DISK IS REALLY ERASED!!!!
: : : : : : : -------------------------------------------------------------
: : : : : :
: : : : : :
: : : : : : Yo it is cuming up wid an error on this line VbSendKeys the error is Sub or function not defined
: : : : : : so what could be the prob thx from
: : : : : : mark
: : : : : :
: : : : : :
: : : : : :
: : : : : hey m8, try deleting vb in vbSendKeys, so [code]vbSendKeys "{ENTER}"[/code]
: : : : : becomes
: : : : : [code]SendKeys "{ENTER}"[/code]
: : : : : Try that.
: : : : :
: : : : : Greetz,
: : : : : EtHeO out...
: : : : :
: : : : :
: : : : hi thx that has worked but it is cuming up with aqn error on the line now SLL = Shell("c:command.com", vbHide) but it does not say wot the error is
: : : : from
: : : : mark
: : : :
: : : Hey, replace [code]SLL = Shell("c:command.com", vbHide)[/code] with [code]Shell "c:command.com", vbHide[/code]
: : : should work fine then
: : : EtHeO out...
: :
: : Yo mate na that is not working either
: : from
: : mark
: :
: then use Shell "command.com", vbHide when using windows 95, 98 or Me
: and use Shell "cmd.com", vbHide when using windows XP or 2000
: EtHeO out...
:
:
Hi it is still coming up in a yellow box when i play it could it be dure to thaT I HAVE NO DISK IN the floppy drive when i try it
from
mark
from
mark
: from
: mark
:
I'm sorry, but I don't know exactly what the error is, and before I know that, I can't fix it
EtHeO out...
: : from
: : mark
: :
: I'm sorry, but I don't know exactly what the error is, and before I know that, I can't fix it
: EtHeO out...
:
ok it comes up with no error it is just highlighted in a yellow box