+ Reply to Thread
Results 1 to 9 of 9

Error 438 - selection.bug

Hybrid View

Manekas Error 438 - selection.bug 01-10-2022, 06:57 AM
romperstomper Re: Error 438 - selection.bug 01-10-2022, 07:00 AM
Manekas Re: Error 438 - selection.bug 01-10-2022, 07:02 AM
AliGW Re: Error 438 - selection.bug 01-10-2022, 07:00 AM
Manekas Re: Error 438 - selection.bug 01-10-2022, 07:03 AM
romperstomper Re: Error 438 - selection.bug 01-10-2022, 07:06 AM
Manekas Re: Error 438 - selection.bug 01-10-2022, 07:10 AM
romperstomper Re: Error 438 - selection.bug 01-10-2022, 07:12 AM
superspud Re: Error 438 - selection.bug 01-10-2022, 08:19 AM
  1. #1
    Registered User
    Join Date
    01-10-2022
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    4

    Error 438 - selection.bug

    Hello Guys,

    I need your help. I was running my macro without problems (I was using Excel 2013 and now company changed to Excel 365) and I am getting this error 438 on the following line:
    Sub add_IFS_data_and_volume()
    
    Dim IFS_row_count, eP_number, Last_row As Long
    Dim Sheet_name As String
        
        Application.Calculation = xlCalculationManual
        
        Worksheets("IFS").Select
        On Error Resume Next
        ActiveSheet.ShowAllData
        On Error GoTo 0 ' re-activate error message
        Columns("N:N").Select
        Selection.NumberFormat = "0"
    
        Worksheets("Overview").Select
        i = Worksheets("Overview").Cells(2, 3).End(xlDown).Row
        
        For j = 3 To i
    '        If Cells(j, 3).Value = 28077 Then Selection.bug
            Application.StatusBar = j & "/" & i
            Worksheets("Overview").Select
            Cells(j, 5).Select
            If Cells(j, 48).Value <> 0 And Cells(j, 103).Value = 1 And Cells(j, 5).Hyperlinks.Count > 0 Then
                IFS_row_count = Cells(j, 48).Value
                eP_number = Cells(j, 3)
                Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    
     Sheet_name = ActiveSheet.Name
    '            If Sheet_name = "28077" Then Selection.bug
                
                If ActiveSheet.Name = "Overview" Then Selection.bug (MISTAKE HERE)
                'delete old IFS value
                For m = 1 To 200
    Can you please let me know what I can do to correct this mistake ?

    Thank you
    Last edited by AliGW; 01-10-2022 at 07:00 AM. Reason: Code tags added. Please read our rules as soon as possible!

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,018

    Re: Error 438 - selection.bug

    What is bug supposed to be? That's not an excel method.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    01-10-2022
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    4

    Re: Error 438 - selection.bug

    The code is not mine. That is why I am struggling.

    It was working fine with Excel 2013, but when I changed it become like this.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,284

    Re: Error 438 - selection.bug

    Administrative Note:

    Welcome to the forum.

    You need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code] [/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new here, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    01-10-2022
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    4

    Re: Error 438 - selection.bug

    Thank you and sorry for that.

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,018

    Re: Error 438 - selection.bug

    What are your hyperlinks to? There is, as I said, no bug method in Excel, so I can only assume it's a method of whatever gets selected by following the hyperlink.

  7. #7
    Registered User
    Join Date
    01-10-2022
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    4

    Re: Error 438 - selection.bug

    This is a big excel file with several row showing our car programs that are currently in production. Each row has a hyperlink to a tab where we have all the data of the program.
    Last edited by AliGW; 01-10-2022 at 07:13 AM. Reason: PLEASE don't quote unnecessarily!

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,018

    Re: Error 438 - selection.bug

    All I can tell you is that that code is not valid - in any version of Excel - for any part of the Excel/Office object model.

  9. #9
    Registered User
    Join Date
    01-27-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    19

    Re: Error 438 - selection.bug

    Did your previous version of Excel have any Add-ins installed that haven't been installed/selected in the 365 version? Just a guess as like rorya said .bug is not part of any standard excel object model.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] sort by selection vba error
    By bob33 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2017, 12:41 PM
  2. Selection error
    By Mantask in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2015, 01:14 PM
  3. range selection error
    By daniva92 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2013, 10:32 AM
  4. Selection.AutoFill error
    By Dabooj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2008, 12:26 PM
  5. error 91 with selection
    By Reinder in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2007, 03:41 AM
  6. [SOLVED] Selection Error
    By cheungm@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2006, 04:43 PM
  7. Selection.Sort error
    By Krager in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1