Ошибка 50290 vba excel

I use asynchronous WinHTTP in Excel VBA to shoot requests to a website. After the reply is received, a module is called which writes to the sheet.

If the user does not have the focus on Excel, it will error out with

«Run-time error ‘50290’: Application-defined or object-defined error».

On this line:

pcol = ThisWorkbook.Worksheets("WHA").Cells.Find("PRODUCTA").Column

I tried the following syntaxes as well:

pcol = Sheet3.Cells.Find("PRODUCTA").Column
pcol = Sheet3.Rows(5).Find("PRODUCTA").Column
pcol = Sheet3.Rows(5).Find(What:="PRODUCTA").Column
pcol = Sheets("WHA").Cells.Find(What:="PRODUCTA", LookAt:=xlWhole, LookAfter:=Sheet3.Cells(5, 1)).Column

I can force the focus back on Excel in VBA, but ideally, I don’t mind if the macro runs in the background.

Community's user avatar

asked Jul 23, 2015 at 20:49

JasperD's user avatar

3

You could try to trap the error and continue executing the code, this might help.

Sub Test()

...declarations...

On Error Goto Error_

...your code...

Exit Sub

Error_:
 If (Err.Number = 50290) Then Resume
Stop
Resume
End Sub

answered Aug 26, 2015 at 12:32

alexkovelsky's user avatar

alexkovelskyalexkovelsky

3,8211 gold badge27 silver badges21 bronze badges

AppActivate "Microsoft Excel"

Or store your WB when you know you have focus and active it after

answered Jul 23, 2015 at 21:44

n0v1c3's user avatar

n0v1c3n0v1c3

1167 bronze badges

4

Try setting these two flags to false, while running the macro:

Application.ScreenUpdating = False
Application.DisplayAlerts = False

answered Feb 21, 2019 at 16:09

mhu's user avatar

mhumhu

17.7k10 gold badges62 silver badges93 bronze badges

I have also run into this error but in another situation. While handling a workbook from Access. I ‘m posting this just for future reference.

AppActivate needs the title of the application that will activate.

If you don’t know the exact title at runtime, then write the following:

AppActivate Application.Caption

If you use another application like Access then set an object to Excel at the begining and replace Application with the object.

answered Aug 30, 2019 at 10:20

mits's user avatar

mitsmits

7863 gold badges9 silver badges19 bronze badges

I know this is an old question, but if someone encounters this…

I also use async http requests (module wrappers made by Tim Hall).

The callback is wrapping an Application.Run method; the issue I was having is that, due to the limitations of the REST API I was accessing, I had to rate limit my requests on the client side.

I did this with Application.Wait
The responses were triggering http response event when the application was waiting and trying to do Application.Run

So simply replacing Application.Wait with another «wait» that allows events fixed the issue.

Alternative to .Wait

Public Declare PtrSafe Function GetTickCount Lib "kernel32" () As Long

Sub Halt(Finish As Long)
'Finish in seconds
Dim NowTick As Long
Dim EndTick As Long
EndTick = GetTickCount + (Finish * 1000)
Do
    NowTick = GetTickCount
    DoEvents
Loop Until NowTick >= EndTick
End Sub 

answered Oct 31, 2019 at 11:06

Sergei Trunov's user avatar

Then i double click on cell with data validation and then try to select from dropdown I get error Runtime error Run-time error ‘50290’. Method «_Evaluate’ of object’_Worksheet’ failed

Private Sub Worksheet_Change(ByVal Target As Range)

Select Case Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    Case Is < 5
        LastRow = 5: CountRow = 0: R = 1
    Case Is > 5
        LastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row: CountRow = LastRow - 4: R = 0
    Case 5
        LastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row: CountRow = LastRow - 4: R = 1
End Select
End Sub

on

Select Case Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
case 1
      msgbox "hello"
end select

Runtime error Run-time error ‘50290’. Application-defined or object-defined error.

on

Select Case Cells.Find(What:="*", After:=Range("A1"), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row

Why this happens?

Icon Ex Номер ошибки: Ошибка 50290
Название ошибки: Excel Error 50290
Описание ошибки: Ошибка 50290: Возникла ошибка в приложении Microsoft Excel. Приложение будет закрыто. Приносим извинения за неудобства.
Разработчик: Microsoft Corporation
Программное обеспечение: Microsoft Excel
Относится к: Windows XP, Vista, 7, 8, 10, 11

Определение «Excel Error 50290»

Эксперты обычно называют «Excel Error 50290» «ошибкой времени выполнения». Разработчики Microsoft Corporation обычно оценивают Microsoft Excel с помощью серии модулей для удаления ошибок в соответствии с отраслевыми стандартами. Тем не менее, возможно, что иногда ошибки, такие как ошибка 50290, не устранены, даже на этом этапе.

Некоторые люди могут столкнуться с сообщением «Excel Error 50290» во время работы программного обеспечения. После возникновения ошибки 50290 пользователь программного обеспечения имеет возможность сообщить разработчику об этой проблеме. Затем программисты могут исправить эти ошибки в коде и включить исправление, которое можно загрузить с их веб-сайта. Поэтому, когда вы сталкиваетесь с запросом на обновление Microsoft Excel, это обычно связано с тем, что это решение для исправления ошибки 50290 и других ошибок.

Как триггеры Runtime Error 50290 и что это такое?

У вас будет сбой во время выполнения Microsoft Excel, если вы столкнетесь с «Excel Error 50290» во время выполнения. Проанализируем некоторые из наиболее распространенных причин ошибок ошибки 50290 во время выполнения:

Ошибка 50290 Crash — это типичная ошибка «Excel Error 50290», которая приводит к полному завершению работы программы. Как правило, это результат того, что Microsoft Excel не понимает входные данные или не знает, что выводить в ответ.

Утечка памяти «Excel Error 50290» — Когда Microsoft Excel обнаруживает утечку памяти, операционная система постепенно работает медленно, поскольку она истощает системные ресурсы. Возможные причины из-за отказа Microsoft Corporation девыделения памяти в программе или когда плохой код выполняет «бесконечный цикл».

Ошибка 50290 Logic Error — логическая ошибка возникает, когда компьютер производит неправильный вывод, даже если вход правильный. Это видно, когда исходный код Microsoft Corporation включает дефект в анализе входных данных.

В большинстве случаев проблемы с файлами Excel Error 50290 связаны с отсутствием или повреждением файла связанного Microsoft Excel вредоносным ПО или вирусом. Как правило, решить проблему можно заменой файла Microsoft Corporation. В некоторых случаях реестр Windows пытается загрузить файл Excel Error 50290, который больше не существует; в таких ситуациях рекомендуется запустить сканирование реестра, чтобы исправить любые недопустимые ссылки на пути к файлам.

Распространенные сообщения об ошибках в Excel Error 50290

Частичный список ошибок Excel Error 50290 Microsoft Excel:

  • «Ошибка в приложении: Excel Error 50290»
  • «Excel Error 50290 не является приложением Win32.»
  • «Извините, Excel Error 50290 столкнулся с проблемой. «
  • «Файл Excel Error 50290 не найден.»
  • «Excel Error 50290 не может быть найден. «
  • «Ошибка запуска программы: Excel Error 50290.»
  • «Excel Error 50290 не работает. «
  • «Ошибка Excel Error 50290. «
  • «Excel Error 50290: путь приложения является ошибкой. «

Обычно ошибки Excel Error 50290 с Microsoft Excel возникают во время запуска или завершения работы, в то время как программы, связанные с Excel Error 50290, выполняются, или редко во время последовательности обновления ОС. При появлении ошибки Excel Error 50290 запишите вхождения для устранения неполадок Microsoft Excel и чтобы HelpMicrosoft Corporation найти причину.

Excel Error 50290 Истоки проблем

Эти проблемы Excel Error 50290 создаются отсутствующими или поврежденными файлами Excel Error 50290, недопустимыми записями реестра Microsoft Excel или вредоносным программным обеспечением.

В первую очередь, проблемы Excel Error 50290 создаются:

  • Недопустимая (поврежденная) запись реестра Excel Error 50290.
  • Вирус или вредоносное ПО, повреждающее Excel Error 50290.
  • Другая программа (не связанная с Microsoft Excel) удалила Excel Error 50290 злонамеренно или по ошибке.
  • Excel Error 50290 конфликтует с другой программой (общим файлом).
  • Microsoft Excel (Excel Error 50290) поврежден во время загрузки или установки.

Продукт Solvusoft

Загрузка
WinThruster 2023 — Проверьте свой компьютер на наличие ошибок.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление

  • Remove From My Forums
  • Question

  • How is 50290 thrown? How is it defined?

    Iam getting, Run-time error ‘59299’: Method ‘enabledCancelKey of object’ Application’ failed.

    What does this mean and how can it be resolved?

    • Moved by

      Thursday, August 23, 2012 7:28 PM
      This question is not related to apps for Office. (From:Developing Apps for Office)

Answers

  • There’s few information about this error. What I got: it’s VBA runtime error. Could be introduced by a missing reference in VBA project.  Please go to VB IDE by Alt+ F11, then Tools — > references and check the selected.

    I’m referring to
    this article.

    thanks.


    Forrest Guo | MSDN Community Support |
    Feedback to manager

    • Proposed as answer by
      Forrest Guo
      Wednesday, August 22, 2012 1:22 AM
    • Marked as answer by
      Forrest Guo
      Friday, August 24, 2012 5:31 AM

mumps

mumps

Well-known Member

Joined
Apr 11, 2012
Messages
12,817
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows


  • #2

What exactly are you trying to do? It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (

not a picture

) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for ‘Sharing’ and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).

ascalise

New Member

Joined
Oct 8, 2015
Messages
21


  • #3

Box isn’t sending me an account validation email, nor can I download add-ins on this PC, the attached documentation will need to suffice for now.

Box finally got the email out, here’s a test workbook I created that exhibits the described behavior:

app.box.com

I just don’t want a dropdown selection from the list in Range(«G19») to throw a ‘50290’ error when Worksheet_Change runs after making the selection. If I can see the debug statement in the immediate console with the above code it’s a success.

mumps

mumps

Well-known Member

Joined
Apr 11, 2012
Messages
12,817
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows


  • #4

Try:

VBA Code:

Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("G19")) Is Nothing Then
        MsgBox Target
    End If
End Sub

Joe4

Joe4

MrExcel MVP, Junior Admin

Joined
Aug 1, 2002
Messages
68,118
Office Version
  1. 365
Platform
  1. Windows


  • #5

What exactly is the Data Validation rule in G19?

If it works on everyone’s computer except one person, that suggest that the problem is probably with that users computer or environment, and not with the VBA code.
They could have a corrupt version of Excel and may need a re-install.

ascalise

New Member

Joined
Oct 8, 2015
Messages
21


  • #6

Currently data validation is just a simple list of numbers (1,2,3) to get the point across, in the original workbook it was an INDIRECT to reference table. At this point it’s seeming like a corruption in Excel as it only happens with dropdown lists on this single PC. Just worrying that it happened out of the blue.

ascalise

New Member

Joined
Oct 8, 2015
Messages
21


  • #7

Try:

VBA Code:

Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("G19")) Is Nothing Then
        MsgBox Target
    End If
End Sub

Same error. I just noticed now that if I double click the range to bring it into focus and show the cursor and click away it runs the macro just fine. It’s only when I make a selection with the dropdown arrow that it throws the error. So seemingly not a code issue, something in my installation is just broken causing Application.Ready to be stuck False after dropdown selection.

Понравилась статья? Поделить с друзьями:
  • Ошибка 5029 такая карта не обслуживается
  • Ошибка 5029 при оплате картой тинькофф
  • Ошибка 5029 при оплате картой газпромбанк
  • Ошибка 5029 при оплате картой втб
  • Ошибка 5029 на терминале при оплате картой