More on Macros - Excel 97
I realize that I also need to be able to refer in relative terms to the
workbook next to the current workbook.. So what I need to is to cut and paste the value of a cell from a workbook to the left of the current one into the current cell. i.e. cut and paste from workbook B into workbook A using relativity so to speak. I want to use the macro for a number of paired work books in the spread sheet. Work book B is always to the left of Work book A. Any help would be much appreciated! Abay |
Yes, mixed work books and work sheets up in my post .. apologies, really am
a newbie .. abay "Tom Ogilvy" wrote in message ... I assume by workbook you mean worksheet activesheet.previous.Range("A1").Copy Destination:=ActiveCell -- Regards, Tom Ogilvy "Abay" wrote in message ... I realize that I also need to be able to refer in relative terms to the workbook next to the current workbook.. So what I need to is to cut and paste the value of a cell from a workbook to the left of the current one into the current cell. i.e. cut and paste from workbook B into workbook A using relativity so to speak. I want to use the macro for a number of paired work books in the spread sheet. Work book B is always to the left of Work book A. Any help would be much appreciated! Abay |
I assume by workbook you mean worksheet
activesheet.previous.Range("A1").Copy Destination:=ActiveCell -- Regards, Tom Ogilvy "Abay" wrote in message ... I realize that I also need to be able to refer in relative terms to the workbook next to the current workbook.. So what I need to is to cut and paste the value of a cell from a workbook to the left of the current one into the current cell. i.e. cut and paste from workbook B into workbook A using relativity so to speak. I want to use the macro for a number of paired work books in the spread sheet. Work book B is always to the left of Work book A. Any help would be much appreciated! Abay |
Thanks Tom for you suggestion, but I am having trouble getting what I want
to work. The following works fine when I use absolute references to the work sheet names. Sub Uhrs() ' ' Updated hrs Macro ' Macro recorded 7/3/05 by Abay ' ' Keyboard Shortcut: Ctrl+h ' Sheets("MSH").Select Range("B29").Select Selection.Copy Sheets("M. Stevanak").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False End Sub I get the values from B29 in MSH work sheet into the current cell in work sheet "M. Stevanak". When I tried to add in your code (I am at the state of always recording macros, not proficient in VB code as you may have guessed) I keep getting errors .. obviously I am doing it wrong:( Some more help would really be appreciated. abay |
Hi Abay, As far as I understand, it seems that you are : * selecting data in a specific cell from a specific sheet; * then trying to copy it in another sheet in a specific cell. I'll try to help but I don't understand what you would like to do afterwards with the copied data. Koen -- Koen_VN ------------------------------------------------------------------------ Koen_VN's Profile: http://www.excelforum.com/member.php...o&userid=25593 View this thread: http://www.excelforum.com/showthread...hreadid=384206 |
All times are GMT +1. The time now is 05:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com