coxonitus
05-02-2011, 07:04 AM
hi guys,
here i'am again.
i'm using this code below.
' Dim exemplaar As String
exemplaar = Application.InputBox(Title:=UCase("Wat moet er gebeuren ?"), prompt:="* Document opslaan en afsluiten ? = Antwoord : Ja" & vbLf & "* Pagina afdrukken, geef aantal exemplaren :" & vbLf & "* niets doen : antwoord A", Default:="1", Type:=2)
Select Case UCase(exemplaar)
Case "", "A": MsgBox "je hebt op annuleren gedrukt"
Case "JA":
ActiveSheet.Copy
Range("K:L,M:N:O:P:Q:R").Select
Selection.EntireColumn.Hidden = True
Application.EnableEvents = True
ActiveSheet.SaveAs "G:\Project\Temp.File\Brandstofverbruik" & SheetName & ".xls"
ActiveWindow.Close
Case Else
If IsNumeric(exemplaar) Then
If CInt(exemplaar) > 0 Then ActiveSheet.printout Copies:=CInt(exemplaar), Preview:=False
End If
End Select
End Sub
when you look at my zip file u see 2 buttons, when i give command save, it has to hide columns en the 2 buttons, to copy en saving it as xls.file.
everything works except hiding the buttons.
anyone
here i'am again.
i'm using this code below.
' Dim exemplaar As String
exemplaar = Application.InputBox(Title:=UCase("Wat moet er gebeuren ?"), prompt:="* Document opslaan en afsluiten ? = Antwoord : Ja" & vbLf & "* Pagina afdrukken, geef aantal exemplaren :" & vbLf & "* niets doen : antwoord A", Default:="1", Type:=2)
Select Case UCase(exemplaar)
Case "", "A": MsgBox "je hebt op annuleren gedrukt"
Case "JA":
ActiveSheet.Copy
Range("K:L,M:N:O:P:Q:R").Select
Selection.EntireColumn.Hidden = True
Application.EnableEvents = True
ActiveSheet.SaveAs "G:\Project\Temp.File\Brandstofverbruik" & SheetName & ".xls"
ActiveWindow.Close
Case Else
If IsNumeric(exemplaar) Then
If CInt(exemplaar) > 0 Then ActiveSheet.printout Copies:=CInt(exemplaar), Preview:=False
End If
End Select
End Sub
when you look at my zip file u see 2 buttons, when i give command save, it has to hide columns en the 2 buttons, to copy en saving it as xls.file.
everything works except hiding the buttons.
anyone