![]() |
Reference different workbook
Hi all, Sure this is a relatively simple one but i'm having trouble (i blame the night befores alcohol intake). I want to send this info to a workbook called "sales" in the c:\ drive into a sheet called "sales". What is the correct way to reference this in the code below:- Sheets("INVOICE").Select Dim lrw As Long, cl As Long lrw = Sheets("sales").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Row Sheets("sales").Cells(lrw, 1) = Sheets("invoice").Range("F3") Sheets("Sales").Cells(lrw, 2) = Sheets("invoice").Range("M5") Thanks in advance as usual. Chris -- chris100 ------------------------------------------------------------------------ chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166 View this thread: http://www.excelforum.com/showthread...hreadid=533001 |
Reference different workbook
see a possible answer to your second posting of this question.
-- Regards, Tom Ogilvy "chris100" wrote: Hi all, Sure this is a relatively simple one but i'm having trouble (i blame the night befores alcohol intake). I want to send this info to a workbook called "sales" in the c:\ drive into a sheet called "sales". What is the correct way to reference this in the code below:- Sheets("INVOICE").Select Dim lrw As Long, cl As Long lrw = Sheets("sales").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Row Sheets("sales").Cells(lrw, 1) = Sheets("invoice").Range("F3") Sheets("Sales").Cells(lrw, 2) = Sheets("invoice").Range("M5") Thanks in advance as usual. Chris -- chris100 ------------------------------------------------------------------------ chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166 View this thread: http://www.excelforum.com/showthread...hreadid=533001 |
Reference different workbook
thanks tom, i had a problem logging on when i posted. -- chris100 ------------------------------------------------------------------------ chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166 View this thread: http://www.excelforum.com/showthread...hreadid=533001 |
All times are GMT +1. The time now is 11:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com