On 2/5/07, Ennio-Sr <[EMAIL PROTECTED]> wrote:
Hi Mark,* Mark Knecht <[EMAIL PROTECTED]> [040207, 16:46]: > On 2/4/07, Ennio-Sr <[EMAIL PROTECTED]> wrote: > >Hi Mark, > > > >* Mark Knecht <[EMAIL PROTECTED]> [030207, 17:20]: > >[...] This is not what you would like but seems to be a better workaround: 1. in the conditional formatting, set the 'equal to' condition to cell $A$1 2. Copy this macro into your Calc sheet and assign it a keystroke ---------------- sub cptoa1 dim document as object dim dispatcher as object document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array()) dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "ToPoint" args1(0).Value = "$A$1" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1()) dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array()) end sub ---------------- Suppose you assign the "CTRL+A" keystroke to the macro: now, as you navigate your ss, whatever the cell you are in at the moment, if you press CTRL+A that particular cell contents will be copied to cell $A$1 (or any other of your choice, to be indicated in the last but third of my macro) thus firing up the condit. formatting. It worked in my small test ss ... ;) Cheers, Ennio.
Hi Ennio, First, and again, thanks for your help on this. OK, I've installed your macro and figured out how to bind it to a key. CTRL+A seems to be a default assignment to select all cells in the spreadsheet so I bound it to CTRL+SHIFT+A and it seems to function. However I have two problems: 1) The macro moves the current location of the active cell to the cell being written. The defeats the main thing I wanted which was to not move away from the location I'm getting the value from. Can you think of how to modify the macro so that it pastes the contents of the cell I'm in into $A$1 but remains at the cell I'm in and doesn't move? 2) Since my main spreadsheet page is a roll-up of a spreadsheet that is put out each week the values I see in my spreadsheet on sheet 1 are actually values on other sheets. My front sheet has values in it such as: =12_8_06.C43 where 12_8_06 is the name of another sheet in the file and C43 is the cell number on that page I want to see on this main page. As the macro sits right now it doesn't copy what I see in my main spreadsheet but rather copies the equation that references the other page. Can you see how to copy the contents of the other page at the location in the current cells instead of the equation in the current cell? Anyway, I'm learning a bit so I'll do some study on this. Hopefully I can figure it all out. Your work has been helpful. Thanks! Cheers, Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
