Stellar Blade Un'esclusiva PS5 che sta facendo discutere per l'eccessiva bellezza della protagonista. Vieni a parlarne su Award & Oscar!
 
Pagina precedente | 1 | Pagina successiva
Vota | Stampa | Notifica email    
Autore

form visualizzazione grafici

Ultimo Aggiornamento: 06/11/2021 00:29
Post: 6.571
Registrato il: 14/11/2004
Utente Master
Office 2019
OFFLINE
04/11/2021 16:03

Ciao, ho fatto le prove ed in effetti si blocca, perche non riesce a creare l'immagine del grafico, a volte funziona ed altre volte no.

secondo me dovresti prima selezionare il grafico e poi creare l'immagine.

in rete ho trovato questo codice che crea l'immagine del grafico selezionato, vedi se può esserti utile.

Sub ExportChart()
Const sSlash$ = "/"
Const sPicType$ = ".gif"
Dim sChartName$
Dim sPath$
Dim sBook$
Dim objChart As ChartObject
On Error Resume Next
Set objChart = ActiveSheet.ChartObjects(1)
If objChart Is Nothing Then
MsgBox "No charts have been detected on this sheet", 0
Exit Sub
End If
If ActiveChart Is Nothing Then
MsgBox "You must select a single chart for exporting ", 0
Exit Sub
End If
Start:
sChartName = Application.InputBox("Please Specify a name for the exported chart" & vbCr & _
"There is no default name available" & vbCr & _
"The chart will be saved in the same folder as this file", "Chart Export", "")
If sChartName = Empty Then
MsgBox "You have not entered a name for this chart", , "Invalid Entry"
GoTo Start
End If
If sChartName = "False" Then
Exit Sub
End If
sBook = ActiveWorkbook.Path
sPath = sBook & sSlash & sChartName & sPicType
ActiveChart.Export Filename:=sPath, FilterName:="GIF"
End Sub


vedi se riesci altrimenti tento io di aggiustarti la macro.

però pensandoci bene invece della casella di riepilogo(ComboBox) potresti usare gli OptionButton nel form per selezionare i 6 grafici, se sono solamente 6, ed inserire nella Caption il nome del grafico.

Ciao By Sal (8-D

[Modificato da by sal 04/11/2021 16:09]
se ti piace la soluzione sostienici con una DONAZIONE a piacere. Grazie clicca qui
Vota: 15MediaObject5,00612 6
Amministra Discussione: | Chiudi | Sposta | Cancella | Modifica | Notifica email Pagina precedente | 1 | Pagina successiva
Nuova Discussione
 | 
Rispondi
Cerca nel forum
Tag discussione
Discussioni Simili   [vedi tutte]
Feed | Forum | Bacheca | Album | Utenti | Cerca | Login | Registrati | Amministra
Tutti gli orari sono GMT+01:00. Adesso sono le 07:46. Versione: Stampabile | Mobile | Regolamento | Privacy
FreeForumZone [v.6.1] - Copyright © 2000-2024 FFZ srl - www.freeforumzone.com