Results 1 to 3 of 3

Thread: Excel and locking Margins

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    London, UK
    Posts
    137
    Hi

    I have a Q regarding Excel...here it goes

    I need to lock the margins of the workbook so that they can not be changed in the print preview or page setup....


    Any Advice / Help would be great

    Thanks inadvance,

    Regards,
    Rocks
    join me in the platinum

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    Chicago
    Posts
    97

    Here it is.....

    Hi,
    You can very well do that by using the following code

    xlapp.Worksheets("Sheet1").PageSetup.PrintArea = "$A" & ":$I"

    This will set the margin to I cell and remember you can manipulate it with the above code as required by you

    Hope this help's you
    Anil

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    London, UK
    Posts
    137

    Talking Thanks

    Cheers

    join me in the platinum

Posting Permissions

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



Click Here to Expand Forum to Full Width