Ask Experts Questions for FREE Help !
Ask
    SC-tbfd's Avatar
    SC-tbfd Posts: 58, Reputation: 1
    Junior Member
     
    #1

    Mar 14, 2008, 12:16 PM
    Cut and paste a macro?
    I'm trying to create a spreadsheet based on an older version that has a macro. When open both workbooks, cut and paste the old to the new, open vb editor and drag the forms folder and modules folder to the new workbook the macro runs but is broken (it works in the old workbook)

    Is there more to this process?

    Thanks for any tips
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Mar 14, 2008, 12:17 PM
    Depends on what the macro does. It might be dependent on cell names that no longer exist.

    I would copy the whole file then delete the data rather than try to copy the macros.
    SC-tbfd's Avatar
    SC-tbfd Posts: 58, Reputation: 1
    Junior Member
     
    #3

    Mar 14, 2008, 01:22 PM
    I did actually cut and paste the whole worksheet. The error that comes up is variable undefined. When I compare, the macros seem to be the same line for line (they should be I simply dragged and dropped)

    Is it possible there is something integral to the macro that is hidden or outside the area I selected with my cut and paste? I don't understand how or where excel saves the macro in relation to the worksheet that I see. Is the macro actually contained in a cell (like under the button that runs the macro) or is it a collection of things saved 'outside' of the worksheet.
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #4

    Mar 14, 2008, 05:39 PM
    I believe the code is saved outside the worksheet data but as part of the workbook. Variable undefined means there is some named variable that is missing. Like I said, probably a Range name. Copying and pasting the whole sheet may miss that.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Copy and paste [ 1 Answers ]

If I want to copy and paste something onto an email it doesn't take it. What am I doing wrong?

Melon paste? [ 10 Answers ]

Does anyone know how to make melon paste? I want to make a japanese bread called melonpan (melon bread) and I wanted to add melon paste to it (put it in between the bread part and the cookie part). I have searched all over the net and can't find anything useful. I was hoping someone here could help...

Can not "copy", "paste" and "cut" ! [ 2 Answers ]

Last week, my laptop was infected by virus, I sent for repair. After that, I couldn't find "copy" and "cut", and"paste" is in grey colour ! What have to do to have them back ? Can someone help ? Thanks in advance !

Cut her loose or cut her slackj [ 3 Answers ]

Dude, this sounds bad, but my friend is hott(not in a lesbo way), and she is friends with all the guys. But whenever she tries to help out a friend, they always endup liking her! It really ticks me off because all the guys love her and I really don't need her taking the only guy I got! She always...

Sellect all/caps locked/cut n paste issues windows xp [ 5 Answers ]

I recently got this lap top and I notice (maybe because I am accidentally touching a wrong key that all of a sudden the only parts of a paragraph more or less then I wanted become highlighted when I want to cut and paste. Another thing that happens is that the caps all get locked in this strange...


View more questions Search