Bonjour,
pourriez-vous me venir en aide, je ne trouve pas l'erreur dans ma macro.
quand je clique sur mon bouton, ma macro Csv se lance et j'ai un premier userform qui s'ouvre (détail sous la macro)
quand j'affiche le contenu msgbox à l’intérieur du userform j'ai bien mon contenu par contre une fois le userform fermé, je perds le contenu et mon fichier s'enregistre sous "prévisions_.csv"
je n'arrive pas à voir c qui cloche, merci de bien vouloir me venir en aide?
Macro Csv
Sub Csv()
Sheets("prévisions").Select
UserForm1.Show
MsgBox semaine
ActiveWorkbook.SaveAs Filename:= _
"\\serv-orm-hypv-1\REP\_K_REP\Suivi_Rep\2-KPI-2020-HZN\1-Pilotage-activité-Stat_Glob-BO\PLANNING\prévisions_" & semaine & ".csv" _
, FileFormat:=xlCSV, CreateBackup:=False
' Sheets("prévisions_" & semaine & ").Select
' Sheets("prévisions_" & semaine & ").Name = "prévisions"
Sheets("prévisions_").Select
Sheets("prévisions_").Name = "prévisions"
UserForm2.Show
ActiveWorkbook.SaveAs Filename:= _
"\\serv-orm-hypv-1\REP\_K_REP\Suivi_Rep\2-KPI-2020-HZN\3-Suivi-encours-mensuel\Suvi_activité-Stat-Glob_" & mois & ".xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
Sheets("Planification OPT-WLN-WLS").Select
End Sub
détail du userform1
Private Sub semaine_Change()
semaine.Text = UCase(semaine.Text)
End Sub
Private Sub Valider_Click()
UserForm1.Hide
semaine = semaine.Value
MsgBox semaine
End Sub
pourriez-vous me venir en aide, je ne trouve pas l'erreur dans ma macro.
quand je clique sur mon bouton, ma macro Csv se lance et j'ai un premier userform qui s'ouvre (détail sous la macro)
quand j'affiche le contenu msgbox à l’intérieur du userform j'ai bien mon contenu par contre une fois le userform fermé, je perds le contenu et mon fichier s'enregistre sous "prévisions_.csv"
je n'arrive pas à voir c qui cloche, merci de bien vouloir me venir en aide?
Macro Csv
Sub Csv()
Sheets("prévisions").Select
UserForm1.Show
MsgBox semaine
ActiveWorkbook.SaveAs Filename:= _
"\\serv-orm-hypv-1\REP\_K_REP\Suivi_Rep\2-KPI-2020-HZN\1-Pilotage-activité-Stat_Glob-BO\PLANNING\prévisions_" & semaine & ".csv" _
, FileFormat:=xlCSV, CreateBackup:=False
' Sheets("prévisions_" & semaine & ").Select
' Sheets("prévisions_" & semaine & ").Name = "prévisions"
Sheets("prévisions_").Select
Sheets("prévisions_").Name = "prévisions"
UserForm2.Show
ActiveWorkbook.SaveAs Filename:= _
"\\serv-orm-hypv-1\REP\_K_REP\Suivi_Rep\2-KPI-2020-HZN\3-Suivi-encours-mensuel\Suvi_activité-Stat-Glob_" & mois & ".xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
Sheets("Planification OPT-WLN-WLS").Select
End Sub
détail du userform1
Private Sub semaine_Change()
semaine.Text = UCase(semaine.Text)
End Sub
Private Sub Valider_Click()
UserForm1.Hide
semaine = semaine.Value
MsgBox semaine
End Sub