Excel 2007 Vba Error 438
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more excel vba error 438 object doesn't support about Stack Overflow the company Business Learn more about hiring developers or posting ads
Excel Vba Runtime Error 438
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow excel vba runtime error 438 combobox is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Excel VBA, error 438 "object doesn't support this property or method up
Excel Vba Runtime Error 438 Object Doesn't Support This Property Or Method
vote 2 down vote favorite I have this code in which I've been getting help with a bit, but I've run into an issue, or what I think is an issue. The last lookup, I am being told that the object doesn't support this property or method. I know it's probably something easy, but my brain is smoldering. I'd like some help if someone knows the answer of why run-time error 438 excel vba this is happening. Thanks. Option Explicit Sub Update_Dakota() Dim wsDAO As Worksheet 'Dakota OOR Dim wsDAD As Worksheet 'Dakota Data Dim wsDAR As Worksheet 'Dakota Archive Dim wsPOR As Workbook 'New Workbook Dim lastrow As Long, fstcell As Long Dim strFile As String, NewFileType As String, filename As String Set wsDAO = Sheets("Dakota OOR") Set wsDAD = Sheets("Dakota Data") Set wsDAR = Sheets("Dakota Archive") With Application .ScreenUpdating = False .DisplayAlerts = False .EnableEvents = False End With lastrow = wsDAD.Range("B" & Rows.Count).End(xlUp).Row + 1 With wsDAD .Range("I2").Formula = "=COUNTIFS('Dakota OOR'!$B:$B,$A2,'Dakota OOR'!$D:$D,$C2, 'Dakota OOR'!$G:$G,$F2)" .Range("J2").Formula = "=IF(I2,""Same"",""Different"")" wsDAD.Range("I2:J2").Copy wsDAD.Range("I3:J" & lastrow) wsDAD.Range("I:J").Calculate End With strFile = Application.GetOpenFilename() NewFileType = "Excel Files 2007 (*.xls)" Set wsPOR = Application.Workbooks.Open(strFile) lastrow = wsPOR.Range("A" & Rows.Count).End(xlUp).Row + 1 wsPOR.Range("A2:G" & lastrow).Select End Sub excel excel-vba share|improve this question asked Sep 5 '12 at 19:40 Matt Ridge 1,209113252 5 lastrow = wsPOR.Range("A" & Rows.Count).End(xlUp).Row + 1 has no worksheet associated with it. wsPOR is set your workbook. You can only find ranges on worksheets. Also, the next line, wsPOR.Range("A2:G" & lastrow).Select needs to refer to a worksheet, not workbook. –Scott Holtzman Sep 5 '12 at 19:48 add a comment| 1 Answer 1 active oldest votes up vote 6 down vote acce
360 games PC games
Visual Basic Error 438 Excel
Windows games Windows phone games Entertainment All Entertainment
Vba Runtime Error 438 Object Doesn't Support This Property Or Method
Movies & TV Music Business & Education Business Students & educators run time error 438 excel macro Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet http://stackoverflow.com/questions/12288588/excel-vba-error-438-object-doesnt-support-this-property-or-method Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All https://support.microsoft.com/en-us/kb/175616 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
VBA Code & Other Help Excel Help [SOLVED] Run-time error 438: Object doesn't support this property or method If this is your first visit, be sure to check out the FAQ by clicking the link above. http://www.vbaexpress.com/forum/showthread.php?48304-Run-time-error-438-Object-doesn-t-support-this-property-or-method You may have to register before you can post: click the register link http://www.vbforums.com/showthread.php?460591-RESOLVED-Runtime-error-438-Object-doesn-t-support-this-property-or-method above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: Run-time error 438: Object doesn't support this property or method Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch error 438 to Threaded Mode 11-30-2013,07:42 PM #1 El_Diabolo View Profile View Forum Posts View Blog Entries View Articles VBAX Regular Joined Sep 2013 Posts 57 Location Run-time error 438: Object doesn't support this property or method Hi All, I have run into the above error while trying to use variables for workbook and worksheet names. The workbook in question is the active workbook and the sheet exists. time error 438 I have tried searching for the solution, but I have not found it and I can't figure it out. There may be other ways to do it, but I would like to know what is wrong with this code please. Dim wkbDest As Workbook Dim TP As Worksheet Set wkbDest = Workbooks("Table Plan for Cameron.xlsm") Set TP = Worksheets("TablePlan") wkbDest.TP.Range("A1:H24").Clear ' This is where the error 438 happens Formatting tags added by mark007 Many thanks. Reply With Quote 11-30-2013,09:13 PM #2 EirikDaude View Profile View Forum Posts View Blog Entries View Articles VBAX Contributor Joined Sep 2009 Posts 148 Location Would using "wkbDest.TP.Range("A1:H24").ClearContents" do the trick? -edit- Nevermind, the problem isn't the function called, it's with how you define your objects. You need to do it like this: Option Explicit Sub test() Dim wkbDest As Workbook Dim TP As Worksheet Set wkbDest = Workbooks("Table Plan for Cameron.xlsm") Set TP = wkbDest.Worksheets("TablePlan") TP.Range("A1:H24").Clear ' This is where the error 438 happens End Sub Formatting tags added by mark007 Reply With Quote 12-01-2013,06:37 AM #3 El_Diabolo View Profile View Forum Posts View Blog Entries View Articles VBAX Regular Joined Sep 2013 Posts 57 Location Thanks (again), Eirik. Works perfect
doesn't support this property or method If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: [RESOLVED] Runtime error 438 Object doesn't support this property or method Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Mar 30th, 2007,04:42 AM #1 marktheman View Profile View Forum Posts Thread Starter Lively Member Join Date Feb 2007 Location Dublin, Ireland Posts 120 [RESOLVED] Runtime error 438 Object doesn't support this property or method Hi, I'm doing a simple excel project and part of it is updating fields in a table. Say the recordset has 500 entries. For some entries, when I update I have no issue but when I update older entries from an access database, I get the following error. "Runtime error 438 Object doesn't support this property or method". I'm using ADO connectivity and excel as a database Example: Code: rs.Open "SELECT * FROM [tblfissection$] Where RequestNo = " & requestNoSubstringed, conn, adOpenStatic, adLockOptimistic, adCmdText On Error GoTo updateFISTable 'rs.Fields(1) = "" 'rs.Fields(2) = DTEvaluationDate.Value rs.Fields(3) = TextProposedSolOutline.Text Any ideas Reply With Quote Mar 30th, 2007,08:44 AM #2 sparbag View Profile View Forum Posts Hyperactive Member Join Date May 2006 Posts 361 Re: Runtime error 438 Object doesn't support this property or method Hello, From Microsoft website: Run Time Error 438 - Object Doesn't Support this Property or Method The most common cause of error 438 is not maintaining binary compatibility between successive versions of your components. Each COM interface has an associated GUID that is called an interface ID (IID). Each coclass has an associated GUID that is called class ID (CLSID). When you compile an ActiveX component in Visual Basic, t