I want to disable print for all users manually, Just print only from the macro assign button (want to use for small office billing invoices)
Sub PostToRegister()
Dim WS1 As worksheet
Dim WS2 As worksheet
Set WS1 = Worksheets("INVOICE")
Set WS2 = Worksheets("DATABASE")
WS2.Unprotect Password:="123"
WS1.Unprotect Password:="123"
' figure out which row is the next row
nextrow = WS2.Cells(Rows.Count, 1).End(xlUp).Row + 1
' write the important values to DATABASE
WS2.Cells(nextrow, 1).Resize(1, 7).Value = Array(WS1.Range("E11"), WS1.Range("E12"), WS1.Range("B11"), _
WS1.Range("B17"), WS1.Range("E25"), WS1.Range("E26"), WS1.Range("E27"))
WS2.Protect Password:="123"
WS1.Protect Password:="123"
End Sub
Sub PostToRegister()
Dim WS1 As worksheet
Dim WS2 As worksheet
Set WS1 = Worksheets("INVOICE")
Set WS2 = Worksheets("DATABASE")
WS2.Unprotect Password:="123"
WS1.Unprotect Password:="123"
' figure out which row is the next row
nextrow = WS2.Cells(Rows.Count, 1).End(xlUp).Row + 1
' write the important values to DATABASE
WS2.Cells(nextrow, 1).Resize(1, 7).Value = Array(WS1.Range("E11"), WS1.Range("E12"), WS1.Range("B11"), _
WS1.Range("B17"), WS1.Range("E25"), WS1.Range("E26"), WS1.Range("E27"))
WS2.Protect Password:="123"
WS1.Protect Password:="123"
End Sub