+ Reply to Thread
Results 1 to 10 of 10

PRINT OUT

  1. #1
    Tufail
    Guest

    PRINT OUT

    hello, how can i stop someone to make printout my sheet or some data
    thanks in advance

  2. #2
    CLR
    Guest

    RE: PRINT OUT

    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


  3. #3
    Tufail
    Guest

    RE: PRINT OUT

    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


  4. #4
    CLR
    Guest

    RE: PRINT OUT

    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


  5. #5
    Tufail
    Guest

    RE: PRINT OUT

    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


  6. #6
    CLR
    Guest

    RE: PRINT OUT

    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


  7. #7
    Tufail
    Guest

    RE: PRINT OUT

    don't worry that wasn't important data, anyway just i don't want let someone
    make print out my data but i want make printout myself anyway there ?

    "CLR" wrote:

    > 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


  8. #8
    CLR
    Guest

    RE: PRINT OUT

    Maybe something along these lines would be better for you.........if you type
    "password" without quotes in Sheet3 cell A3, then you can print out Sheet 1
    ok, if that cell is empty, Sheet 1 will not print out.......you can change
    the password and the ranges to suit your needs.....

    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    If Not Range("sheet3!a3").Value = "password" Then
    Sheets("Sheet3").Select
    Range("A1:B2").Select
    End If
    End Sub

    Vaya con Dios,
    Chuck, CABGx3




    "Tufail" wrote:

    > don't worry that wasn't important data, anyway just i don't want let someone
    > make print out my data but i want make printout myself anyway there ?
    >
    > "CLR" wrote:
    >
    > > 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


  9. #9
    R. Choate
    Guest

    Re: PRINT OUT

    No offense, but if you are giving advice that includes a macro that will delete data, and the user has only said they don't want it
    printed, the LEAST you can do is warn them that this option will delete the data if they run the macro. Good thing they only have to
    close without saving to get their data back if they were smart and saved before putting your macro in their file.
    --
    RMC,CPA


    "CLR" <CLR@discussions.microsoft.com> wrote in message news:D0794508-4E8F-4243-8AF2-5D412C97EFFA@microsoft.com...
    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




  10. #10
    CLR
    Guest

    Re: PRINT OUT

    Agreed. My bad there. I did apologize and offered another solution after
    the OP brought it to my attention. I know that's not as good after the fact,
    but it's all I can do at this time. Incidently, no offense taken, and thanks
    for raising the issue, that all concerned might avert the same sort of
    mistake in the future.

    Vaya con Dios,
    Chuck, CABGx3



    "R. Choate" wrote:

    > No offense, but if you are giving advice that includes a macro that will delete data, and the user has only said they don't want it
    > printed, the LEAST you can do is warn them that this option will delete the data if they run the macro. Good thing they only have to
    > close without saving to get their data back if they were smart and saved before putting your macro in their file.
    > --
    > RMC,CPA
    >
    >
    > "CLR" <CLR@discussions.microsoft.com> wrote in message news:D0794508-4E8F-4243-8AF2-5D412C97EFFA@microsoft.com...
    > 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

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1