ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with "Run-time error €˜438:" (https://www.excelbanter.com/excel-programming/298617-help-run-time-error-%E2%80%98438%E2%80%99.html)

Joop[_3_]

Help with "Run-time error €˜438:"
 
Hi all

I am tracking invoice info. ("GES Invoice11.xls", sheet "GES") to a separate workbook ("Invoice Log.xls", sheet "Sheet1"). BTW, thanks for the code, Bob Phillips and RPIJG

I am getting the following error

Run-time error €˜438
Object doesnt support this property or method

Following is the macro

Sub InvoiceDataTransfer(
Dim iLastRow As Lon
Dim an
ans = MsgBox("Are you sure? Doing so will automatically create a new invoice entry.", vbYesNo
If ans = vbYes The
Workbooks.Open Filename:="C:\data\ges\accounting\invoice log.xls
With ActiveWorkboo
With .Worksheets("Sheet1"
iLastRow = .Cells(Rows.Count, "A").End(xlUp).Row +
..Range("A" & iLastRow).Value = .Worksheets("GES").Range("C7").Valu
..Range("B" & iLastRow).Value = .Worksheets("GES").Range("C4").Valu
..Range("C" & iLastRow).Value = .Worksheets("GES").Range("A10").Valu
..Range("D" & iLastRow).Value = .Worksheets("GES").Range("A12").Valu
..Range("E" & iLastRow).Value = .Worksheets("GES").Range("A13").Valu
..Range("F" & iLastRow).Value = .Worksheets("GES").Range("C35").Valu
..Range("G" & iLastRow).Value = .Worksheets("GES").Range("F17").Valu
..Range("H" & iLastRow).Value = .Worksheets("GES").Range("F18").Valu
..Range("I" & iLastRow).Value = .Worksheets("GES").Range("F19").Valu
End Wit
End Wit
End I
End Su

Any ideas

Thanks in advance for your input

mudraker[_222_]

Help with "Run-time error ‘438’:
 
Try Removing .. at the start of each line of code

As you are dealing with 2 workbooks you will also need to ad
Workbooks("("GES Invoice11.xls") after the = sign


..Range("A" & iLastRow).Value = .Worksheets("GES").Range("C7").Valu

--
Message posted from http://www.ExcelForum.com


Joop[_3_]

Help with "Run-time error ‘438’:
 
Thanks for your time, Mudraker

It works well now.


All times are GMT +1. The time now is 03:59 AM.

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