+ Reply to Thread
Results 1 to 16 of 16

Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro.

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro.

    Dear Forum,

    I have a Sheet which has a Comment, now I am replicating this sheet using a Macro and then the Sheet is renamed and then again using another Macro first a New File is created and then this New replica of this Sheet gets transfered to this new created file..

    But in the new file , the comment does not show up..
    Can someone please give me some inputs as what could be the reason for this..

    Due to the sensitive nature of the data, I cannot upload the File but please find the code which is used to create the Replica and then transfer it to a new file..

    Please Login or Register  to view this content.
    Now there's some code above which is commented but actually earlier I was trying to create the Comment in the Replica Sheet and then just Move this Replica sheet with the comment to the new file , however that did not work so i just created the comment in the original though I would prefer to create it dynamically in the copied sheet and then just move it to the new file..

    Please Login or Register  to view this content.


    Thanks in advance..

    Warm regards
    e4excel
    Last edited by e4excel; 09-20-2012 at 12:26 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Hi, e4excel,

    why not copy the sheet directly and work on it later on?
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Hi HahoBe,

    Thanks for the reply but this is done in a Loop with other things happening at the same time and therefore don't want this to be done manually,
    there is a Comment in the Original Sheet - "Index-Sheet" in the cell E8 or cell(8,5)..

    Now this comment does not show in the Sheet after getting transferred but it is present when the Sheet is copied so something uncanny happens during the Transfer or the MoveIndex sub routine...

    SO please advise..

  4. #4
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    I have tried so many times but unable to fathom where the problem lies , can someone please look into my code and help me..
    As mentioned earlier now in my present file I have the Comment in the original sheet 'Index-Sheet" , however would appreciate if it can be added in the copied sheet for which the code is ready but just commented but it should stay in the file after running the Sub MoveIndex...

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Hi, e4excel,

    your code worked fine on a sample for me. Maybe you attach a copy of your workbook?

    Ciao,
    Holger

  6. #6
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Did the New sheet Index in the New file Index display the comment with Command Button Comment Autoshape

  7. #7
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Dear HaHobe,

    Without the Sheet will it be completely impossible to offer a solution as this data is extremely sensitive and so is the Template

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Hi, e4excel,

    there are not very much things I know about VBA but if your Sheet "Index_Sheet" has a comment in Range("E5") and you copy this sheet (may it be within the workbook or in between workbooks) that comment will be there as well (this goes for any version of Excel 97 to 2010 for Windows).

    Please Login or Register  to view this content.
    This will delete comments as well if used in the code.

    Ciao,
    Holger

  9. #9
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    My comment is in the cell E8 and it is a un-common Commnet as the Autoshape is like a Command Button..
    This comment stays in the copied sheet after running the Sub- COpyIndex but after running the sub Moveindex it dissappears

  10. #10
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Dear HaHoBe,

    Just to understand the full operation what I did was I ran the Sub CopyIndex and then got a copy of the Index-Sheet with the Comment and the Sheet was named as Index virtue of the Sub CopyIndex and then I created a new file with the name Index and then I manually tried two things..
    1. Move this Index Sheet from my workbook to the new WorkBook Index
    2. Created a Copy of the Index in the new WorkBook Index..

    But the observations in both the scenarios were the same as the sheet did get in the new workbook Index but without the comment..

    I dont know what else I need to do please someone help me on this..

    Maybe its a simple and stupid thing but i think i have hit the walls now..

    Thanks in advance

    Warm REgards
    e4excel

  11. #11
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Hi, e4excel,

    I´ll try to rebuild a scenario reflecting your situation. I just want to assure to do the right things and have to ask two things: you indicate to use Excel2007. Is that true? And if so what is the standard fileformat for saving new files on the system?

    Might be that I´m missing something obvious but I still can´t find it though (maybe too early in the morning by now).

    Ciao,
    Holger

  12. #12
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Yes I am using 2007 and want the Comments to show up in the Copied and Transferred Sheet..
    I am sorry for replying late but actually net speed was pathetic so I could post my replies in the last two days...
    Last edited by e4excel; 09-23-2012 at 10:11 PM.

  13. #13
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Hi, e4excel,

    result to my test was like I expected it to be: the newly created file with the code supplied (and some small alterations) shows the comment.

    Altered code for MoveIndex:
    Please Login or Register  to view this content.
    Tested with Excek2007 on WinServer2003, Fileformat is xlsm on the system. Both workbooks are in 97-2003 Fileformat.

    Ciao,
    Holger

  14. #14
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Gud Morning Hahobe, I am just testing the Sub..will be back in some time thanks a lot for the help..

  15. #15
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Dear hahobe,

    My nets speed is pathetic and therefore all my typed messages are getting wasted as they don't get posted at all.
    Anyways, I tried your code but nothing worked differently unfortunately..and moreover I started getting a prompt before saving the Index File separately.

    Compatibility checker..

  16. #16
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Comment Absent in the Copied Sheet to a New File created and Transferred using a Macro

    Hi, e4excel,

    sorry but I took your codes (only commented Call DeleteSheets as this was not supplied) and wrote what combination I used. I saved to a location which is considered in my Trust Center. Sorry but I´m out of ideas how to solve your problem for the moment.

    Ciao,
    Holger

+ 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