Name conflict defined Print_Area

andcol 0 Reputation points
2023-02-13T11:00:13.3533333+00:00

I have a name conflict problem called Print_Area, I use a macro to print a specific area of the paper and it works fine. After saving, if I click again on the print button to make a second print, it compares the defined name conflict message. In name management I always find the name Area_stampa relating to the sheet where I have the pdf printout which, even if canceled at the first call-up of the print button, reappears in name management. I ask how to disable the name Area_print defined in excel which creates a conflict for me. Thank you

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Emily Hua-MSFT 27,796 Reputation points
    2023-02-14T05:53:08.6466667+00:00

    Hi @andcol

    Could you pleas let us know what format of the workbook? If it is .xlm, I suggest you save it as .xlsm.

    Please make sure no object or range named Print_area, if there is any existed one, you need to rename it.

    Besides, if that object or range is used in the macro, please also change the code to reflect the new name.

    Here are 2 articles you may have a look.

    Why am I seeing the Name Conflict dialog box in Excel

    https://www.xlspadlock.com/doc/index.htm?context=1690

    (Please Note: Since the web site is not hosted by Microsoft, the link may changed without notice. Microsoft does not guarantee the accuracy of this information.)


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  2. andcol 0 Reputation points
    2023-02-14T17:05:06.6166667+00:00

    Thanks for the reply.

    The working folder format is .xlsm.

    In name management I don't have any object or range called Area_stampa, it creates it only after clicking on the button with macro for printing a part of the sheet in pdf. All the print ranges in the various sheets, in name management I have named them all with unique names.

    I have already consulted the links "https://www.xlspadlock.com/doc/index.htm?context=1690" and tried to insert the VBA code snippet but without positive response. I'm waiting for a response from xlspadlock as well.

    As for the other suggested link, inserting any character in the conflict dialog box solves the problem, but I would like to solve the problem cleanly without bringing up the conflict dialog box.

    Thank you

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.