
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Private Sub OptionButton1_Click() If OptionButton1.Value = True Then X = ShellExecute(0, "OPEN", "C:xxxxxxxx.xxx", "", "", 1) End If End Sub Private Sub OptionButton2_Click() If OptionButton2.Value = True Then MsgBox "tuo avviso" UserForm1.Hide End If End Sub |
Sub auto_open()
Dim Variabile As Integer
Variabile = MsgBox("Vuoi aiutarci a capire qualcosa di te?", vbYesNo)
End SubPrivate Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Sub OptionYes_Click()
If OptionYes.Value = True Then
X = ShellExecute(0, "OPEN", "Z:Questionario.ppt", "", "", 1)
End If
End Sub
Private Sub OptionNo_Click()
If OptionNo.Value = True Then
MsgBox "Peccato! Grazie lo stesso, ciao!"
UserForm1.Hide
End If
End Sub |
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Sub auto_open()
Variabile = MsgBox("Vuoi aiutarci a capire qualcosa di te?", vbYesNo)
If Variabile = vbYes Then
X = ShellExecute(0, "OPEN", "C:usersadelmodesktoppresentazione1.ppt", "", "", 1)
Else
MsgBox "Peccato! Grazie lo stesso, ciao!"
UserForm1.Hide
End If
End Sub |
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Sub auto_open()
Application.WindowState = xlMinimized
Variabile = MsgBox("Vuoi aiutarci a capire qualcosa di te?", vbYesNo)
If Variabile = vbYes Then
MsgBox "Grazie! Allora, cominciamo!"
X = ShellExecute(0, "OPEN", "Z:Questionario.ppt", "", "", 1)
Else
MsgBox "Peccato! Grazie lo stesso, ciao!"
Userform1.Hide
End If
End Sub |
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Sub auto_open()
'Application.WindowState = xlMinimized
Variabile = MsgBox("Vuoi aiutarci a capire qualcosa di te?", vbYesNo)
If Variabile = vbYes Then
MsgBox "Evviva! Era proprio quello che speravo! Le istruzioni da seguire sono molto semplici.."
MsgBox "...infatti, tu dovrai soltanto rispondere un sì o un no ogni volta che vedrai comparire una domanda! NIENT'ALTRO!"
MsgBox "Tutto chiaro?, vbYesNo
If Variabile = vbYes Then
MsgBox "Bene, allora cominciamo!"
Else
MsgBox "Ripeto, c'è una sola cosa che dovrai fare: rispondere un sì o un no ogni volta che vedrai comparire una domanda! NIENT'ALTRO! Ora è chiaro?, vb YesNo"
If Variabile = vbYes Then
MsgBox "Bene, allora cominciamo!"
Else
MsgBox "Ripeto, c'è una sola cosa che dovrai fare: rispondere un sì o un no ogni volta che vedrai comparire una domanda! NIENT'ALTRO! Ora è chiaro?, vb YesNo"
X = ShellExecute(0, "OPEN", "Z:Questionario.ppt", "", "", 1)
'ActiveWindow.Close
Application.Quit
Else
MsgBox "Peccato! Grazie lo stesso, ciao!"
Application.Quit
End If
End Sub |
