Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run time error '438'. Object doesn't support this property or meth
I am having great difficulty referencing other workbooks and their worksheet
data from a macro in the Personal Workbook (PERSONAL.XLSB). For example, the following instruction should be, but does not seem to be supported when it occurs in a macro in my Personal Workbook, Personal.xlsb: RowIndex = Workbooks("BookDates1.xlsm").Range("A19"). The following instruction is not supported either: RowIndex = Workbooks("BookDates1.xlsm").cells(19, 1). (RowIndex is defined as: "Dim RowIndex As Long" near the top of the Sub Procedure.) Both of these give the error message: "Run time error '438'. Object doesn't support this property or method. My email address is . Thank you very much. Sincerely, Michael D Fitzpatrick -- May you have a most blessed day! Sincerely, Michael Fitzpatrick |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run time error '438'. Object doesn't support this property or meth
Michael
You are missing the property you are returning at the end of the examples you give. (I am presuming .Value). You should then be careful it is not returning a Double, although that should not give you this error. I suspect the .xlsm on the end of the file names as this should not be necessary if the workbooks are open when the code is run, as they would need to be. (Even if they are hidden)., so Workbooks("BookDates1").Range("A19").Value will work if the workbook is open -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.excelusergroup.org web: www.nickhodge.co.uk "MichaelDavid" wrote in message ... I am having great difficulty referencing other workbooks and their worksheet data from a macro in the Personal Workbook (PERSONAL.XLSB). For example, the following instruction should be, but does not seem to be supported when it occurs in a macro in my Personal Workbook, Personal.xlsb: RowIndex = Workbooks("BookDates1.xlsm").Range("A19"). The following instruction is not supported either: RowIndex = Workbooks("BookDates1.xlsm").cells(19, 1). (RowIndex is defined as: "Dim RowIndex As Long" near the top of the Sub Procedure.) Both of these give the error message: "Run time error '438'. Object doesn't support this property or method. My email address is . Thank you very much. Sincerely, Michael D Fitzpatrick -- May you have a most blessed day! Sincerely, Michael Fitzpatrick |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run time error '438'. Object doesn't support this property or
Michael
Glad you got it fixed -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.excelusergroup.org web: www.nickhodge.co.uk "Michael Fitzpatrick" wrote in message ... Hi Nick: Thanks for your kind response. Actually what is missing is a reference to the particular worksheet of workbook BookDates1 which contains the Range (even though there is only one worksheet in workbook BookDates1). When I fixed this as follows: RowIndex = Workbooks("BookDates1").Worksheets(1).Range("A19") the macro ran without a problem. May you have a blessed day. Sincerely, Michael D Fitzpatrick "Nick Hodge" wrote: Michael You are missing the property you are returning at the end of the examples you give. (I am presuming .Value). You should then be careful it is not returning a Double, although that should not give you this error. I suspect the .xlsm on the end of the file names as this should not be necessary if the workbooks are open when the code is run, as they would need to be. (Even if they are hidden)., so Workbooks("BookDates1").Range("A19").Value will work if the workbook is open -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.excelusergroup.org web: www.nickhodge.co.uk "MichaelDavid" wrote in message ... I am having great difficulty referencing other workbooks and their worksheet data from a macro in the Personal Workbook (PERSONAL.XLSB). For example, the following instruction should be, but does not seem to be supported when it occurs in a macro in my Personal Workbook, Personal.xlsb: RowIndex = Workbooks("BookDates1.xlsm").Range("A19"). The following instruction is not supported either: RowIndex = Workbooks("BookDates1.xlsm").cells(19, 1). (RowIndex is defined as: "Dim RowIndex As Long" near the top of the Sub Procedure.) Both of these give the error message: "Run time error '438'. Object doesn't support this property or method. My email address is . Thank you very much. Sincerely, Michael D Fitzpatrick -- May you have a most blessed day! Sincerely, Michael Fitzpatrick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Object doesn't support this property or method (Error 438) | Excel Programming | |||
Run-time error '438': Object doesn't support this property of meth | Excel Programming | |||
help with my code please. (Error: Object doesn't support this property or method) | Excel Programming | |||
Object doesn't support this property or method (Error 438) | Excel Discussion (Misc queries) | |||
Run Time Error 438 - Object doesn't support the property or method | Excel Programming |