| | Post: 79 | Registrato il: 18/06/2010
| Città: LUGO | Età: 70 | Utente Junior | Excell 2016 | | OFFLINE | |
|
09/10/2020 19:16 | |
Salve, ho creato un foglio excel con 4 pulsanti LISTA/LOCANDINA/FOTO/VIDEO:il 1° mi deve aprire un file Word , il 2° mi deve aprire un file .Jpg il 3° e il 4° mi aprono Cartelle esterne.Il mio problema è :che codice devo assegnare al pulsante LOCANDINA per aprire il file JPG ??? (il cod. che ho inserito non funziona ... cerca di aprire un file .png(???), inoltre vorrei sapere perchè quando clicco il pulsante LISTA(apertura del file Word) mi apre si il documento Word ma me lo mostra solo come documento aperto nella barra applicazioni .. per vederlo devo cliccarci sopra.
Spero di essere stato abbastanza chiaro (????)
Allego il mio file di prova |
|
| | Post: 988 | Registrato il: 16/08/2015
| Città: CORDENONS | Età: 67 | Utente Senior | Excel 2016-32bit Win11 | | OFFLINE |
|
09/10/2020 21:48 | |
Attendiamo fiduciosi il file. Se hai difficoltà prova a zipparlo ed allegare quest'ultimo.
______________________________________________________________
C'è chi fa le COSE a CASO e chi fa CASO alle COSE (Ignoto) |
| | Post: 79 | Registrato il: 18/06/2010
| Città: LUGO | Età: 70 | Utente Junior | Excell 2016 | | OFFLINE | |
|
10/10/2020 15:30 | |
Scusate, pensavo di averlo allegato ... ci riprovo |
| | Post: 989 | Registrato il: 16/08/2015
| Città: CORDENONS | Età: 67 | Utente Senior | Excel 2016-32bit Win11 | | OFFLINE |
|
10/10/2020 19:04 | |
Riscrivi la riga così:
Shell ("mspaint.exe """ & s & """ & "), vbNormalFocus
______________________________________________________________
C'è chi fa le COSE a CASO e chi fa CASO alle COSE (Ignoto) |
| | Post: 80 | Registrato il: 18/06/2010
| Città: LUGO | Età: 70 | Utente Junior | Excell 2016 | | OFFLINE | |
|
10/10/2020 20:02 | |
Scusa rollis13 ma non capisco quale riga devo sostituire (???)
Private Sub CommandButton2_Click()
'APRI FILE JPG
Programma = "rundll32.exe %SystemRoot%\System32\shimgvw.dll C:\Users\rober\OneDrive\Desktop\Locandina Natale ver1.jpg"
TaskId = Shell(Programma, vbNormalFocus)
End Sub
... grazie |
| | Post: 990 | Registrato il: 16/08/2015
| Città: CORDENONS | Età: 67 | Utente Senior | Excel 2016-32bit Win11 | | OFFLINE |
|
10/10/2020 22:21 | |
Boh. Io ho trovato questa macro associata ad un CommandButton2: Private Sub CommandButton2_Click()
'APRI FILE JPG
Dim s As String
s = "C:\Documenti\ AGOSTO 2009.jpg"
If Dir(s) <> "" Then
Shell ("mspaint.exe " & s), vbNormalFocus
Else
MsgBox "Il file non esiste"
End If
End Sub ed è questa macro per cui ho proposto la modifica.
______________________________________________________________
C'è chi fa le COSE a CASO e chi fa CASO alle COSE (Ignoto) |
| | Post: 81 | Registrato il: 18/06/2010
| Città: LUGO | Età: 70 | Utente Junior | Excell 2016 | | OFFLINE | |
|
11/10/2020 09:57 | |
Grazie è perfetto👋 |
| | Post: 991 | Registrato il: 16/08/2015
| Città: CORDENONS | Età: 67 | Utente Senior | Excel 2016-32bit Win11 | | OFFLINE |
|
11/10/2020 11:46 | |
Grazie del riscontro positivo 👍.
______________________________________________________________
C'è chi fa le COSE a CASO e chi fa CASO alle COSE (Ignoto) |
|
|