D
david
I already have a button with a macro to hide the empty rows. With this same
button I want to save the file automatically after the rows are hidden. The
name of the saved file should be the word in cell (“sheet3†“A1â€).
The first macro works the second doesn’t.
Can someone please help me to fix the second and to combine the to.
Thanks!!!
Private Sub CommandButton1_Click()
Dim X As Integer
For X = 5 To 150
If Cells(X, 1).Value = 0 Then
Rows(X).Hidden = True
End If
Next X
End Sub
Sub SaveArchive()
ArchivePath = "Z:\david\werkbonnen\"
WorkBookName = Worksheets(“printâ€).Range(“A1â€).Value
FName = ArchivePath + WorkBookName
ActiveWorkbook.SaveAs Filename:=FName
End Sub
button I want to save the file automatically after the rows are hidden. The
name of the saved file should be the word in cell (“sheet3†“A1â€).
The first macro works the second doesn’t.
Can someone please help me to fix the second and to combine the to.
Thanks!!!
Private Sub CommandButton1_Click()
Dim X As Integer
For X = 5 To 150
If Cells(X, 1).Value = 0 Then
Rows(X).Hidden = True
End If
Next X
End Sub
Sub SaveArchive()
ArchivePath = "Z:\david\werkbonnen\"
WorkBookName = Worksheets(“printâ€).Range(“A1â€).Value
FName = ArchivePath + WorkBookName
ActiveWorkbook.SaveAs Filename:=FName
End Sub