Forum Discussion

Sumit_Bhokare's avatar
Sumit_Bhokare
Brass Contributor
May 25, 2022

How to remove non printable area from excel and save as file

Hi,

I need one help to save existing file which have non printable area & I want to save as file without non printable area.

I also have linking between non printable area to printable area so while saving as file that need to do as paste special values.

 

Attached is sample file. Excel have multiple sheets where this needs to be done.

 

Let me know if someone have any easy way. I'm trying to do it with ASCII code but not able to do.

 

Regards,

Sumit

1 Reply

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    Sumit_Bhokare 

    File won't open probably corrupt or associated macros that I won't open.
    Nevertheless, here is a macro to try out for yourself...not tested.

    Sub MacroCopy()
    Workbooks.Add
    Windows("Filename_Source.xls").Activate
    Sheets("sheet_name_source").Select
    Sheets("TableName_Target").Copy Before:=Workbooks("Book1").Sheets(1)
    Cells.Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Windows("Filename_Source.xls ").Activate
    end sub

     

    Hope I could help you with these information.

     

    NikolinoDE

    I know I don't know anything (Socrates)