Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() If I copy a cell that contains a macro, will the macro also be copied across and the cell reference altered ie the same as a worksheet function would be? If not is there a way to do this? -- frustrated ------------------------------------------------------------------------ frustrated's Profile: http://www.excelforum.com/member.php...o&userid=27778 View this thread: http://www.excelforum.com/showthread...hreadid=494331 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How did you you put the macro in the cell?
-- Gary's Student "frustrated" wrote: If I copy a cell that contains a macro, will the macro also be copied across and the cell reference altered ie the same as a worksheet function would be? If not is there a way to do this? -- frustrated ------------------------------------------------------------------------ frustrated's Profile: http://www.excelforum.com/member.php...o&userid=27778 View this thread: http://www.excelforum.com/showthread...hreadid=494331 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What does this macro do? What are you trying to accomplish? You will have to
provide us with some more detail. Generally formulas are copied to cells, not macros. -- David "frustrated" wrote: If I copy a cell that contains a macro, will the macro also be copied across and the cell reference altered ie the same as a worksheet function would be? If not is there a way to do this? -- frustrated ------------------------------------------------------------------------ frustrated's Profile: http://www.excelforum.com/member.php...o&userid=27778 View this thread: http://www.excelforum.com/showthread...hreadid=494331 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
a cell doesn't contain a macro, it can contain a function, however.
A functions first character must be the "=" (without the quote marks (though excel does allow the Lotus users the convenience of using the + and the - ) By default all cells (for copying and pasting purposes) are set to Relative. There is another setting call Absolute, whch uses the "$" to Anchor a cell reference (disallowing a change to it on Copy/paste) In a function where cell references are used, example A1... can be $A1 << Column A will remain fixed upon being copied/pasterd A$1 << Row 1 will remain fixed upon being copied/pasted $A$1 << A1 will retain its position (A1) upon being pasted. In edit mode - click inside a single cell reference and press the F4 key, do it again, and again. Each time you will see excel circulate making the relative/absolute change.. Hope this helps.. "frustrated" wrote in message ... If I copy a cell that contains a macro, will the macro also be copied across and the cell reference altered ie the same as a worksheet function would be? If not is there a way to do this? -- frustrated ------------------------------------------------------------------------ frustrated's Profile: http://www.excelforum.com/member.php...o&userid=27778 View this thread: http://www.excelforum.com/showthread...hreadid=494331 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() My macro is not contained in a cell. Sorry my mistake. What I meant was I have a macro that enters something into a specifi cell. Now if I copy or cut that cell to another location will the cod also change or will I have to edit it? The reason I'm asking is that I have about 30 cells and I dont reall want to have to alter code for each one. Thanks for your hel -- frustrate ----------------------------------------------------------------------- frustrated's Profile: http://www.excelforum.com/member.php...fo&userid=2777 View this thread: http://www.excelforum.com/showthread.php?threadid=49433 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It depends on how you are referring to the "cells" in your code. If your using
Range("A1"), or the like then the answer to your question is NO Moving A1 will not change the code.. it will still show Range("A1"). If you have used RangeNames, that's a different story In your Code Range("MyRange1") then Your code and your spreadsheet will stay IN SYNC. HTH f in your code you "frustrated" wrote in message ... My macro is not contained in a cell. Sorry my mistake. What I meant was I have a macro that enters something into a specific cell. Now if I copy or cut that cell to another location will the code also change or will I have to edit it? The reason I'm asking is that I have about 30 cells and I dont really want to have to alter code for each one. Thanks for your help -- frustrated ------------------------------------------------------------------------ frustrated's Profile: http://www.excelforum.com/member.php...o&userid=27778 View this thread: http://www.excelforum.com/showthread...hreadid=494331 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Naming Cells with Macros | Excel Discussion (Misc queries) | |||
How to use macros to copy a range of cells which can exclude some cells which I didn't want to be copied? | Excel Worksheet Functions | |||
Protecting Cells with macros | Excel Programming | |||
Excel 97 macros in cells? | Excel Programming | |||
Referencing Cells in Macros | Excel Programming |