ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copy Cells (https://www.excelbanter.com/excel-discussion-misc-queries/1357-copy-cells.html)

Jeff

Copy Cells
 
Hi,

I have 2 workbooks:
# 1 Workbook.("TBD.xls").worksheet("Sheet1")

#2 is a workbook that I open with this VBA macro:
fName = Application.GetOpenFilename
Workbooks.Open filename:=fName
I also have this VBA Macro for fname
blastrow = Cells(Rows.Count, "B").End(xlUp).Row
isum = Application.WorksheetFunction.Sum(Range("b1:b10000 "))
Cells(blastrow + 2, "B").Value = isum

My Question is: How do I copy the value of "Isum" in the
Workbook.("TBD.xls").worksheet("Sheet1") in cell "F34"
Thanks,



P Daulton

Workbooks("TBD.xls").Worksheets("Sheet1").Range("F 34") = isum
note the s at the end of 'worksheets' and 'workbooks'
Pascal

"Jeff" wrote in message
...
Hi,

I have 2 workbooks:
# 1 Workbook.("TBD.xls").worksheet("Sheet1")

#2 is a workbook that I open with this VBA macro:
fName = Application.GetOpenFilename
Workbooks.Open filename:=fName
I also have this VBA Macro for fname
blastrow = Cells(Rows.Count, "B").End(xlUp).Row
isum = Application.WorksheetFunction.Sum(Range("b1:b10000 "))
Cells(blastrow + 2, "B").Value = isum

My Question is: How do I copy the value of "Isum" in the
Workbook.("TBD.xls").worksheet("Sheet1") in cell "F34"
Thanks,





Mark E. Philpot

Hi,

Do not copy. Create variables for the target and source.

EG:
Cells(blastrow + 2, "B").Value = isum
set x=Cells(blastrow + 2, "B").Value

Workbook.("TBD.xls").activate
set y=range("F34")
y.value=x.value

This is secret stuff. Do not tell anyone.

see my stuff at:
http://www.geocities.com/excelmarksway

regards
Mark E. Philpot



-----Original Message-----
Hi,

I have 2 workbooks:
# 1 Workbook.("TBD.xls").worksheet("Sheet1")

#2 is a workbook that I open with this VBA macro:
fName = Application.GetOpenFilename
Workbooks.Open filename:=fName
I also have this VBA Macro for fname
blastrow = Cells(Rows.Count, "B").End(xlUp).Row
isum = Application.WorksheetFunction.Sum(Range

("b1:b10000"))
Cells(blastrow + 2, "B").Value = isum

My Question is: How do I copy the value of "Isum" in the
Workbook.("TBD.xls").worksheet("Sheet1") in cell "F34"
Thanks,


.



All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com