hello, how can i stop someone to make printout my sheet or some data
thanks in advance
hello, how can i stop someone to make printout my sheet or some data
thanks in advance
Excel "security" is usually easily circumvented, but something along these
lines might do what you want.........
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("B5:E10").Select
Selection.ClearContents
Range("A1").Select
End Sub
hth
Vaya con Dios,
Chuck, CABGx3
"Tufail" wrote:
> hello, how can i stop someone to make printout my sheet or some data
> thanks in advance
i made this macro now pls tell me how i can run ?
"CLR" wrote:
> Excel "security" is usually easily circumvented, but something along these
> lines might do what you want.........
>
> Private Sub Workbook_BeforePrint(Cancel As Boolean)
> Range("B5:E10").Select
> Selection.ClearContents
> Range("A1").Select
> End Sub
>
> hth
> Vaya con Dios,
> Chuck, CABGx3
>
>
>
> "Tufail" wrote:
>
> > hello, how can i stop someone to make printout my sheet or some data
> > thanks in advance
The macro should be placed in the "This Workbook" module, and it will run
automatically when a user tries to print.
Vaya con Dios,
Chuck, CABGx3
"Tufail" wrote:
> i made this macro now pls tell me how i can run ?
>
> "CLR" wrote:
>
> > Excel "security" is usually easily circumvented, but something along these
> > lines might do what you want.........
> >
> > Private Sub Workbook_BeforePrint(Cancel As Boolean)
> > Range("B5:E10").Select
> > Selection.ClearContents
> > Range("A1").Select
> > End Sub
> >
> > hth
> > Vaya con Dios,
> > Chuck, CABGx3
> >
> >
> >
> > "Tufail" wrote:
> >
> > > hello, how can i stop someone to make printout my sheet or some data
> > > thanks in advance
sorry i am again, after run this macro my data gone ! how can get back ?
"CLR" wrote:
> The macro should be placed in the "This Workbook" module, and it will run
> automatically when a user tries to print.
>
> Vaya con Dios,
> Chuck, CABGx3
>
>
>
> "Tufail" wrote:
>
> > i made this macro now pls tell me how i can run ?
> >
> > "CLR" wrote:
> >
> > > Excel "security" is usually easily circumvented, but something along these
> > > lines might do what you want.........
> > >
> > > Private Sub Workbook_BeforePrint(Cancel As Boolean)
> > > Range("B5:E10").Select
> > > Selection.ClearContents
> > > Range("A1").Select
> > > End Sub
> > >
> > > hth
> > > Vaya con Dios,
> > > Chuck, CABGx3
> > >
> > >
> > >
> > > "Tufail" wrote:
> > >
> > > > hello, how can i stop someone to make printout my sheet or some data
> > > > thanks in advance
I'm sorry......the macro does "clear contents" on the selected range, thereby
"preventing that area from being printed out". Since you had not specified
what particular data you wished prevented from printout, I only offered it as
a example method of what could be done. It never occured to me that you
would want the user to be able to continue working with the sheet after
trying and failing to print out. The data cannot be restored in this
session. If you did not save the file back over the original, then just
re-opening the original will retrieve the data. If you wish a similar
action, but the data to be retrieveable, then the macro could be modified to
just copy the data to another sector and then later be restored back.....or
a completely different tact taken. Give us some more details on exactly what
you wish to have happen when a user tries to print out, and someone will help.
Vaya con Dios,
Chuck, CABGx3
"Tufail" wrote:
> sorry i am again, after run this macro my data gone ! how can get back ?
>
> "CLR" wrote:
>
> > The macro should be placed in the "This Workbook" module, and it will run
> > automatically when a user tries to print.
> >
> > Vaya con Dios,
> > Chuck, CABGx3
> >
> >
> >
> > "Tufail" wrote:
> >
> > > i made this macro now pls tell me how i can run ?
> > >
> > > "CLR" wrote:
> > >
> > > > Excel "security" is usually easily circumvented, but something along these
> > > > lines might do what you want.........
> > > >
> > > > Private Sub Workbook_BeforePrint(Cancel As Boolean)
> > > > Range("B5:E10").Select
> > > > Selection.ClearContents
> > > > Range("A1").Select
> > > > End Sub
> > > >
> > > > hth
> > > > Vaya con Dios,
> > > > Chuck, CABGx3
> > > >
> > > >
> > > >
> > > > "Tufail" wrote:
> > > >
> > > > > hello, how can i stop someone to make printout my sheet or some data
> > > > > thanks in advance
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks