Ошибка 380 vba

Run time error 380 vba excel This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions. Answered by: Question I have a workbook with a user form containing a lot of different text boxes, combo boxes and check boxes all linked to cells in a worksheet with the ControlSource property. […]

Содержание

  1. Run time error 380 vba excel
  2. Answered by:
  3. Question
  4. Как исправить время выполнения Ошибка 380 Ошибка Excel 380
  5. «run-time error ‘380’- invalid property value
  6. «run-time error ‘380’- invalid property value
  7. Re: «run-time error ‘380’- invalid property value
  8. Re: «run-time error ‘380’- invalid property value
  9. Re: «run-time error ‘380’- invalid property value
  10. Re: «run-time error ‘380’- invalid property value
  11. Re: «run-time error ‘380’- invalid property value
  12. Runtime error 380 when trying to set RowSource property of ComboBox in VBA in Excel 2010 Pro x64
  13. Der Hexer
  14. Thread: [RESOLVED] Run-time error ‘380’: Could not set the value property. Invalid property value
  15. [RESOLVED] Run-time error ‘380’: Could not set the value property. Invalid property value
  16. Re: Run-time error ‘380’: Could not set the value property. Invalid property value
  17. Re: Run-time error ‘380’: Could not set the value property. Invalid property value
  18. Re: Run-time error ‘380’: Could not set the value property. Invalid property value
  19. Re: Run-time error ‘380’: Could not set the value property. Invalid property value
  20. Posting Permissions

Run time error 380 vba excel

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I have a workbook with a user form containing a lot of different text boxes, combo boxes and check boxes all linked to cells in a worksheet with the ControlSource property.

At first when the workbook is opened and the the user form is opened everything works well and all the controls are linked correctly to the cells in the worksheet. The problem arise when the workbook has been open for a while and you try to open the user form and then it won’t work anymore and the following error message is given:

So the problem is that the error doesn’t occur all the time the user form is opened and initiated it occurs after a while, and when the error has occurred the workbook has to be closed and reopened for the user form to work again. So as far as I can see the ControlSource property is not given an invalid property value.

Does anyone recognize this error and know how to fix it?

Since it doesn’t occur all the time I had a thought that it might be a bug in Excel, could it be like that?

Источник

Как исправить время выполнения Ошибка 380 Ошибка Excel 380

В этой статье представлена ошибка с номером Ошибка 380, известная как Ошибка Excel 380, описанная как Ошибка 380: Возникла ошибка в приложении Microsoft Excel. Приложение будет закрыто. Приносим свои извинения за неудобства.

Информация об ошибке

Имя ошибки: Ошибка Excel 380
Номер ошибки: Ошибка 380
Описание: Ошибка 380: Возникла ошибка в приложении Microsoft Excel. Приложение будет закрыто. Приносим свои извинения за неудобства.
Программное обеспечение: Microsoft Excel
Разработчик: Microsoft

Этот инструмент исправления может устранить такие распространенные компьютерные ошибки, как BSODs, зависание системы и сбои. Он может заменить отсутствующие файлы операционной системы и библиотеки DLL, удалить вредоносное ПО и устранить вызванные им повреждения, а также оптимизировать ваш компьютер для максимальной производительности.

О программе Runtime Ошибка 380

Время выполнения Ошибка 380 происходит, когда Microsoft Excel дает сбой или падает во время запуска, отсюда и название. Это не обязательно означает, что код был каким-то образом поврежден, просто он не сработал во время выполнения. Такая ошибка появляется на экране в виде раздражающего уведомления, если ее не устранить. Вот симптомы, причины и способы устранения проблемы.

Определения (Бета)

Здесь мы приводим некоторые определения слов, содержащихся в вашей ошибке, в попытке помочь вам понять вашу проблему. Эта работа продолжается, поэтому иногда мы можем неправильно определить слово, так что не стесняйтесь пропустить этот раздел!

  • Excel — только для вопросов по программированию с объектами или файлами Excel или по разработке сложных формул.
Симптомы Ошибка 380 — Ошибка Excel 380

Ошибки времени выполнения происходят без предупреждения. Сообщение об ошибке может появиться на экране при любом запуске %программы%. Фактически, сообщение об ошибке или другое диалоговое окно может появляться снова и снова, если не принять меры на ранней стадии.

Возможны случаи удаления файлов или появления новых файлов. Хотя этот симптом в основном связан с заражением вирусом, его можно отнести к симптомам ошибки времени выполнения, поскольку заражение вирусом является одной из причин ошибки времени выполнения. Пользователь также может столкнуться с внезапным падением скорости интернет-соединения, но, опять же, это не всегда так.

(Ошибка Excel 380) Repair Tool»/>
(Только для примера)

Причины Ошибка Excel 380 — Ошибка 380

При разработке программного обеспечения программисты составляют код, предвидя возникновение ошибок. Однако идеальных проектов не бывает, поскольку ошибки можно ожидать даже при самом лучшем дизайне программы. Глюки могут произойти во время выполнения программы, если определенная ошибка не была обнаружена и устранена во время проектирования и тестирования.

Ошибки во время выполнения обычно вызваны несовместимостью программ, запущенных в одно и то же время. Они также могут возникать из-за проблем с памятью, плохого графического драйвера или заражения вирусом. Каким бы ни был случай, проблему необходимо решить немедленно, чтобы избежать дальнейших проблем. Ниже приведены способы устранения ошибки.

Методы исправления

Ошибки времени выполнения могут быть раздражающими и постоянными, но это не совсем безнадежно, существует возможность ремонта. Вот способы сделать это.

Если метод ремонта вам подошел, пожалуйста, нажмите кнопку upvote слева от ответа, это позволит другим пользователям узнать, какой метод ремонта на данный момент работает лучше всего.

Источник

«run-time error ‘380’- invalid property value

LinkBack
Thread Tools
Rate This Thread
Display

«run-time error ‘380’- invalid property value

New member here, 1st post so please be gentle and helpful!

I’m trying to run a macro that used to work on my old work pc using excel 2003 however I’ve now been upgraded to a new pc and have windows 2013 and one of my buttons doesn’t work, Every other button in the spreadsheet work when clicked except the main one.

when I go into VBA and debug it shows the following message

«RUN-TIME ERROR ‘380’:
COULD NOT SET THE VALUE PROPERTY. INVALID PROPERTY VALUE

But I have no idea where to look as I didn’t no build this at the start.
please help me!

Re: «run-time error ‘380’- invalid property value

Is there a particular line of code that is highlighted when the error shows?

1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 — 573PH3N H4WK1NG
You don’t have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

Re: «run-time error ‘380’- invalid property value

Assuming both the sheet and the VBA projected are unprotected (if not, unprotect them), right click on the button that’s giving the error and click ‘Assign Macro’.

In the window that appears you’ll see a list of all macros within the project with the one that’s selected listed in the very top section. Click the ‘Edit’ button. Now you’ll see the page of code that the macro exists on. Copy the entire macro from SUB [macroname] to END SUB. Paste it in here and we’ll have a look.

if you really want to speed up problem solving, run the macro and on the error window click ‘Debug’. It’ll take you back to the code window with the line of code that doesn’t work highlighted in yellow. Copy that here.

Re: «run-time error ‘380’- invalid property value

yes — ‘ frmBook.Show ‘ is highlighted (full code below)

Sub Book()
‘ On Error GoTo Err_Book
If Sheets(«Staff»).[N1]

Re: «run-time error ‘380’- invalid property value

yes — ‘ frmBook.Show ‘ is highlighted (full code below)

Sub Book()
‘ On Error GoTo Err_Book
If Sheets(«Staff»).[N1]

Re: «run-time error ‘380’- invalid property value

Assuming both the sheet and the VBA projected are unprotected (if not, unprotect them), right click on the button that’s giving the error and click ‘Assign Macro’.

In the window that appears you’ll see a list of all macros within the project with the one that’s selected listed in the very top section. Click the ‘Edit’ button. Now you’ll see the page of code that the macro exists on. Copy the entire macro from SUB [macroname] to END SUB. Paste it in here and we’ll have a look.

if you really want to speed up problem solving, run the macro and on the error window click ‘Debug’. It’ll take you back to the code window with the line of code that doesn’t work highlighted in yellow. Copy that here.

yes — ‘ frmBook.Show ‘ is highlighted (full code below)

Last edited by 5haks; 08-11-2017 at 04:05 AM .

Источник

Runtime error 380 when trying to set RowSource property of ComboBox in VBA in Excel 2010 Pro x64

Der Hexer

New Member

Hello everyone,
I have a problem and I hope someone can help me with this. In the first place the problem sounds like one of the typical standard mistakes but I think in this case it is different.
I will try to explain, using an example what the problem is:

  • I have two worksheets «Tests» and «Definitions». In the «Definitions»-Worksheet I created three columns, each containing different physical units.
  • The names of these ranges are stored in the workbook space.
  • Then I have a small table containing these three names: «Pressure, Temperature, Force»
  • On the worksheet «Tests» I have a small table with two cells that use data validation.
  • The first cells data validation is connected to the table containing the range names
  • The second ones data validation is linked to the first cell by the INDIRECT macro.

Everything works fine in that worksheet. The user can pick the type of physical quantity (e.g. Pressure) in the first cell and the list of the second cell is than populated with pressure units.
Now I tried to use this table as base for my user form. So I placed two ComboBoxes, namely «ComboBox1» and «ComboBox2» on that form. I than initialized the ComboBoxes as follows:

Unfortunately ComboBox2 isn’t filled with the list of units according to the selection of ComboBox1, but an Error is raised instead:
Run-time error ‘380’: Could not set the RowSource property

The WS.Cells(5, 3).Validation.Formula1 is defined as =INDIRECT($C$4) .

So can someone tell me what the reason for that error is, because I think that the validation formula is correct so far.

Thank You in advance.

System specifications:
MS Windows 7 Ultimate x64
MS Excel Professional Plus 2010 (Version 14.0.7106.5003, x64)

Источник

Thread: [RESOLVED] Run-time error ‘380’: Could not set the value property. Invalid property value

Thread Tools
Display

[RESOLVED] Run-time error ‘380’: Could not set the value property. Invalid property value

I need some help below.

I have created an array with multiple columns and assigned into the combobox.list with the combo setting of:

The .BoundColumn and .Text Column are pointing to different column.

I am assigning the value into the combobox from the background in vba

After entering the number, it give me the error.

«Run-time error ‘380’: Could not set the value property. Invalid property value»

How can i resolve this issue?

Last edited by Hayanegg; Aug 29th, 2021 at 06:53 PM .

Re: Run-time error ‘380’: Could not set the value property. Invalid property value

This looks like it might come from VBA. Is that right?

Re: Run-time error ‘380’: Could not set the value property. Invalid property value

Re: Run-time error ‘380’: Could not set the value property. Invalid property value

Well I do not know about Excel VBA but in VB if you have the combo box style set to drop down list and try to set the text it must match one of the entries in the list for it to be valid.
Could it be that code is executing before the list is populated? or the value entered in the input box is not valid in the list?

Re: Run-time error ‘380’: Could not set the value property. Invalid property value

Thanks everyone for the help. I think i have found my error. When i set the array, my first column is an integer. Somehow when i set the combobox.value, it didnt recognize it is the same type, it must be text data type. After i change my first column array to text, it is working as expected.

  • VBForums
  • Visual Basic
  • Office Development
  • [RESOLVED] Run-time error ‘380’: Could not set the value property. Invalid property value

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Click Here to Expand Forum to Full Width

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

Источник

  • Remove From My Forums
  • Question

  • I have a workbook with a user form containing a lot of different text boxes, combo boxes and check boxes all linked to cells in a worksheet with the ControlSource property.

    TextBox1.ControlSource = Sheet1.Range("A1").Address
    

    At first when the workbook is opened and the the user form is opened everything works well and all the controls are linked correctly to the cells in the worksheet. The problem arise when the workbook has been open for a while and you
    try to open the user form and then it won’t work anymore and the following error message is given:

    Run-time error '380': Could not set the ControlSource property. Invalid property value.

    So the problem is that the error doesn’t occur all the time the user form is opened and initiated it occurs after a while, and when the error has occurred the workbook has to be closed and reopened for the user form to work again. So as far as I can
    see the ControlSource property is not given an invalid property value.

    Does anyone recognize this error and know how to fix it?

    Since it doesn’t occur all the time I had a thought that it might be a bug in Excel, could it be like that?

    Very grateful for
    answers,

    Mårten Fredriksson
     

Answers

  • Please download the sample file from this link

    http://wikisend.com/download/513014/Sample.xls

    This sample file uses absolutely a different approach which I have also covered in this link.

    Topic: VBA – Control Arrays
    Link:
    http://siddharthrout.wordpress.com/2011/08/05/vba-control-arrays/

    Code Used

    In Class Module

    Public WithEvents TextBoxEvents As MSForms.TextBox
    Public WithEvents CheckBoxEvents As MSForms.CheckBox
    
    Public TBIndex As Long, CBIndex As Long
    
    Private Sub TextBoxEvents_Change()
     Sheets("Sheet1").Range("A" & TBIndex).Value = TextBoxEvents.Text
    End Sub
    
    Private Sub CheckBoxEvents_Click()
     Sheets("Sheet1").Range("B" & CBIndex).Value = CheckBoxEvents.Value
    End Sub
    

    In Userform

    Option Explicit
    
    Dim Text1Array() As New Class1
    Dim Text2Array() As New Class1
    
    Private Sub UserForm_Initialize()
     Dim i As Long, j As Long, TBCtl As Control
    
     For Each TBCtl In Me.Controls
      If TypeOf TBCtl Is MSForms.TextBox Then
       i = i + 1
       ReDim Preserve Text1Array(1 To i)
       Set Text1Array(i).TextBoxEvents = TBCtl
       Text1Array(i).TBIndex = i
      End If
      If TypeOf TBCtl Is MSForms.CheckBox Then
       j = j + 1
       ReDim Preserve Text2Array(1 To j)
       Set Text2Array(j).CheckBoxEvents = TBCtl
       Text2Array(j).CBIndex = j
      End If
     Next TBCtl
     Set TBCtl = Nothing
    End Sub
    

    Sid (A good exercise for the Heart is to bend down and help another up)

    Please do not email me your questions. I do not answer questions by email unless I get paid for it :) If you want, create a thread in Excel forum and email me the link and I will help you if I can.

    • Marked as answer by

      Wednesday, August 24, 2011 2:50 AM

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

Оценка «Excel Error 380»

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

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

Когда происходит ошибка 380?

Проблема с исходным кодом Microsoft Excel приведет к этому «Excel Error 380», чаще всего на этапе запуска. Следующие три наиболее значимые причины ошибок выполнения ошибки 380 включают в себя:

Ошибка 380 Crash — Ошибка 380 может привести к полному замораживанию программы, что не позволяет вам что-либо делать. Обычно это происходит, когда Microsoft Excel не может обработать данные в удовлетворительной форме и поэтому не может получить ожидаемый результат.

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

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

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

Ошибки Excel Error 380

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

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

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

Эпицентры Excel Error 380 Головные боли

Проблемы Excel Error 380 вызваны поврежденным или отсутствующим Excel Error 380, недопустимыми ключами реестра, связанными с Microsoft Excel, или вредоносным ПО.

Особенно ошибки Excel Error 380 проистекают из:

  • Недопустимый Excel Error 380 или поврежденный раздел реестра.
  • Зазаражение вредоносными программами повредил файл Excel Error 380.
  • Excel Error 380 ошибочно удален или злонамеренно программным обеспечением, не связанным с приложением Microsoft Excel.
  • Другое приложение, конфликтующее с Excel Error 380 или другими общими ссылками.
  • Microsoft Excel/Excel Error 380 поврежден от неполной загрузки или установки.

Продукт Solvusoft

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

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

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

  1. 08-10-2017, 10:32 AM


    #1

    5haks is offline


    Registered User


    Exclamation «run-time error ‘380’- invalid property value

    Hi

    New member here, 1st post so please be gentle and helpful!

    I’m trying to run a macro that used to work on my old work pc using excel 2003 however I’ve now been upgraded to a new pc and have windows 2013 and one of my buttons doesn’t work, Every other button in the spreadsheet work when clicked except the main one.

    when I go into VBA and debug it shows the following message

    «RUN-TIME ERROR ‘380’:
    COULD NOT SET THE VALUE PROPERTY. INVALID PROPERTY VALUE

    But I have no idea where to look as I didn’t no build this at the start…
    please help me!

    thank you


  2. 08-10-2017, 10:43 AM


    #2

    Re: «run-time error ‘380’- invalid property value

    Is there a particular line of code that is highlighted when the error shows?

    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 — 573PH3N H4WK1NG
    You don’t have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom


  3. 08-10-2017, 10:43 AM


    #3

    Re: «run-time error ‘380’- invalid property value

    Assuming both the sheet and the VBA projected are unprotected (if not, unprotect them), right click on the button that’s giving the error and click ‘Assign Macro’.

    In the window that appears you’ll see a list of all macros within the project with the one that’s selected listed in the very top section. Click the ‘Edit’ button. Now you’ll see the page of code that the macro exists on. Copy the entire macro from SUB [macroname] to END SUB. Paste it in here and we’ll have a look.

    if you really want to speed up problem solving, run the macro and on the error window click ‘Debug’. It’ll take you back to the code window with the line of code that doesn’t work highlighted in yellow. Copy that here.


  4. 08-10-2017, 10:47 AM


    #4

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    yes — ‘ frmBook.Show ‘ is highlighted (full code below)

    Sub Book()
    ‘ On Error GoTo Err_Book
    If Sheets(«Staff»).[N1] < 2 Then
    MsgBox «There must be at least two staff in the database. Please add some more staff.», vbCritical, «Empty Database»
    If Sheets(«Job»).[H1] < 1 Then
    MsgBox «There are no jobs in the database. Please add some job types.», vbCritical, «Empty Database»
    frmJobs.Caption = «Add/Remove Job Catagories»
    frmJobs.Show
    Else
    frmNames.Show
    End If
    Else
    frmBook.Show
    End If

    Exit_Book:
    Exit Sub

    Err_Book:
    LogError «Error in Sub modStart (Code).Book», Err.Number, Err.Description
    Resume Exit_Book

    End Sub


  5. 08-10-2017, 10:48 AM


    #5

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by gmr4evr1
    View Post

    Is there a particular line of code that is highlighted when the error shows?

    yes — ‘ frmBook.Show ‘ is highlighted (full code below)

    Sub Book()
    ‘ On Error GoTo Err_Book
    If Sheets(«Staff»).[N1] < 2 Then
    MsgBox «There must be at least two staff in the database. Please add some more staff.», vbCritical, «Empty Database»
    If Sheets(«Job»).[H1] < 1 Then
    MsgBox «There are no jobs in the database. Please add some job types.», vbCritical, «Empty Database»
    frmJobs.Caption = «Add/Remove Job Catagories»
    frmJobs.Show
    Else
    frmNames.Show
    End If
    Else
    frmBook.Show
    End If

    Exit_Book:
    Exit Sub

    Err_Book:
    LogError «Error in Sub modStart (Code).Book», Err.Number, Err.Description
    Resume Exit_Book

    End Sub


  6. 08-10-2017, 10:49 AM


    #6

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by BellyGas
    View Post

    Assuming both the sheet and the VBA projected are unprotected (if not, unprotect them), right click on the button that’s giving the error and click ‘Assign Macro’.

    In the window that appears you’ll see a list of all macros within the project with the one that’s selected listed in the very top section. Click the ‘Edit’ button. Now you’ll see the page of code that the macro exists on. Copy the entire macro from SUB [macroname] to END SUB. Paste it in here and we’ll have a look.

    if you really want to speed up problem solving, run the macro and on the error window click ‘Debug’. It’ll take you back to the code window with the line of code that doesn’t work highlighted in yellow. Copy that here.

    yes — ‘ frmBook.Show ‘ is highlighted (full code below)

    Last edited by 5haks; 08-11-2017 at 04:05 AM.


  7. 08-10-2017, 11:00 AM


    #7

    Re: «run-time error ‘380’- invalid property value

    Well that’s an odd error message. It’s saying it can’t display the form ‘frmBook’. I was expecting it to be trying to set a property type that’s been removed from Excel.

    Go back to the code window. In the ‘forms’ section in the left most window, is there a form called ‘frmBook’? if so, what happens when you try and edit it?

    oh P.S. When posting code, put it inside [ code ] tags.


  8. 08-10-2017, 11:04 AM


    #8

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by BellyGas
    View Post

    Well that’s an odd error message. It’s saying it can’t display the form ‘frmBook’. I was expecting it to be trying to set a property type that’s been removed from Excel.

    Go back to the code window. In the ‘forms’ section in the left most window, is there a form called ‘frmBook’? if so, what happens when you try and edit it?

    oh P.S. When posting code, put it inside [ code ] tags.

    Yes, there is a form called frmbook and it can be edited.
    Here is the full code below:

    Last edited by 5haks; 08-11-2017 at 04:05 AM.


  9. 08-10-2017, 11:35 AM


    #9

    Re: «run-time error ‘380’- invalid property value

    Hi 5haks, welcome to the forum.
    Unfortunately….

    Your post does not comply with Rule 3 of our Forum

    RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, 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

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)


  10. 08-10-2017, 01:38 PM


    #10

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    How do i do this on my mobile? I don’t have access to a PC until tomorrow


  11. 08-10-2017, 02:23 PM


    #11

    Re: «run-time error ‘380’- invalid property value

    I believe you can actually type CODE (with the brackets) at the start of your code, and /CODE (with the brackets) at the end of it to get it to work.


  12. 08-11-2017, 04:04 AM


    #12

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by gmr4evr1
    View Post

    I believe you can actually type CODE (with the brackets) at the start of your code, and /CODE (with the brackets) at the end of it to get it to work.

    I have added the

    to my previous post. would appreciate any help asap.

    thanks!


  13. 08-11-2017, 05:50 AM


    #13

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    mods — can you reopen this thread/edit your comment so people can help me now please?


  14. 08-11-2017, 07:31 AM


    #14

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    can I send the whole excel doc to someone as this is a big spreadsheet with lots of forms and modules etc running in the background.

    ps — when I change the line that is showing a debug error message to any of the other forms it works fine. for some reason it just isn’t opening that one form


  15. 08-11-2017, 07:40 AM


    #15

    Re: «run-time error ‘380’- invalid property value

    Try putting a break on the first code line within the Initialize event of the userform. Then step through the code until the error occurs.

    Then post the offending line of code.


  16. 08-11-2017, 07:44 AM


    #16

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    Try putting a break on the first code line within the Initialize event of the userform. Then step through the code until the error occurs.

    Then post the offending line of code.

    sorry I don’t quiet understand that as I’m not much of an expert with VBA. could you explain in more detail please?


  17. 08-11-2017, 07:58 AM


    #17

    Re: «run-time error ‘380’- invalid property value

    In the code of the userforms Initialize event select the line and press F9. This should hilite the line with a red bar.

    Run the code and it should pause execution at that point.

    Now use F8 to step through the code line by line. This time it should error on the actual line of code causing the error.


  18. 08-11-2017, 08:03 AM


    #18

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    In the code of the userforms Initialize event select the line and press F9. This should hilite the line with a red bar.

    Run the code and it should pause execution at that point.

    Now use F8 to step through the code line by line. This time it should error on the actual line of code causing the error.

    I have found the cause of the error further down in the frmBook section.

    The places where I had to put a red line are as follows
    Private Sub UserForm_Initialize()

    For Each ctl In frmBook.Controls
    If TypeOf ctl Is ToggleButton Then

    End If
    Next ctl

    However, the main yellow line is highlighting —

    Last edited by 5haks; 08-11-2017 at 08:08 AM.


  19. 08-11-2017, 08:15 AM


    #19

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    it’s now showing as run-time error 9: subscript out of range


  20. 08-11-2017, 08:25 AM


    #20

    Re: «run-time error ‘380’- invalid property value

    There are a few lines there and I don’t know which one you are referring to.

    Do you have more that 42 toggle buttons?


  21. 08-11-2017, 09:26 AM


    #21

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    There are a few lines there and I don’t know which one you are referring to.

    Do you have more that 42 toggle buttons?

    yes, I have 42 toggle buttons


  22. 08-11-2017, 09:51 AM


    #22

    Re: «run-time error ‘380’- invalid property value

    Can you attached zipped file?

    Or better yet remove excess stuff to reduce file size but have error remain


  23. 08-11-2017, 09:53 AM


    #23

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    Can you attached zipped file?

    Or better yet remove excess stuff to reduce file size but have error remain

    how do I attach a zipped file on here?


  24. 08-11-2017, 10:15 AM


    #24

    Re: «run-time error ‘380’- invalid property value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you’re trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to

    Manage Attachments to open the upload window.

    If .zip is not an acceptable file type then change it for the purposes of uploading


  25. 08-11-2017, 10:37 AM


    #25

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you’re trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to

    Manage Attachments to open the upload window.

    If .zip is not an acceptable file type then change it for the purposes of uploading

    I have attached a zipped version of the file for you

    thanks


  26. 08-11-2017, 11:20 AM


    #26

    Re: «run-time error ‘380’- invalid property value

    First problem is you load the list with leave type items and then try and set the value of the list to Holiday. But holiday is not in the list.
    The change selects first item in list

    This just takes you to the next problem in routine fnctGetStaffData

    The named range Leave2 does not exist.


  27. 08-14-2017, 03:22 PM


    #27

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    First problem is you load the list with leave type items and then try and set the value of the list to Holiday. But holiday is not in the list.
    The change selects first item in list

    This just takes you to the next problem in routine fnctGetStaffData

    The named range Leave2 does not exist.

    Could you send me the file with the code fixed for me please?


  28. 08-15-2017, 03:45 AM


    #28

    Re: «run-time error ‘380’- invalid property value

    why do you need the whole file again? I have shown you the only change required to fix the first problem


  29. 08-15-2017, 04:56 AM


    #29

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    why do you need the whole file again? I have shown you the only change required to fix the first problem

    I have managed to get the box to pop up but found another error now as every time I click on the toggle box to book holiday it says «UNEXPECTED ERROR»
    it does then save the holiday booking but it doesn’t do the calculations on the left hand side to show how much leave has been taken and how much leave is left (it remains at 25 regardless).

    any help on this please?


  30. 08-15-2017, 06:15 AM


    #30

    Re: «run-time error ‘380’- invalid property value

    So did you fix the Leave2 range problem?

    As I said fixing that first error simply allowed the code to move to the next problem, which is not fixable as the information is not in the workbook.


  31. 08-15-2017, 06:49 AM


    #31

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    So did you fix the Leave2 range problem?

    As I said fixing that first error simply allowed the code to move to the next problem, which is not fixable as the information is not in the workbook.

    no, my previous post meant it all works (I,e, the macros) but the formulas don’t link/work properly as it doesn’t minus days from the total whenever I book a holiday off, it stays at 25


  32. 08-15-2017, 07:19 AM


    #32

    Re: «run-time error ‘380’- invalid property value

    you will need to post a revised working workbook then


  33. 08-15-2017, 10:37 AM


    #33

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    you will need to post a revised working workbook then

    Updated ZIP file attached.

    Thanks


  34. 08-16-2017, 03:11 AM


    #34

    Re: «run-time error ‘380’- invalid property value

    You are going to have to provide some information about how the program should be used, what should happen when and what is not happening.


  35. 08-16-2017, 03:26 AM


    #35

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    You are going to have to provide some information about how the program should be used, what should happen when and what is not happening.

    When you click into the Book Leave pop-up box:

    When I book an employee off work, it doesn’t do the calculations on the left hand side (where it says LEAVE LEFT, LEAVE TAKEN etc…)
    The number stays at 25 days leave left no matter how many days have been booked off.

    Also, it should not count sick days, training, paternity and maternity as a holiday

    thanks for your help. If this issue can be fixed then fingers crossed that means everything is resolved


  36. 08-16-2017, 03:45 AM


    #36

    Re: «run-time error ‘380’- invalid property value

    Have you tried debugging your code at all?

    In the routine fnctGetStaffData is where you calculate current leave based on an array formula using data on very hidden sheet Leave.
    There is no data on that sheet so the calculation is correct.

    maybe you should be storing something on the sheet before you calculate the days?

    I think you need to speak with the guy that wrote the code in order to progress any further with this.


  37. 08-16-2017, 03:53 AM


    #37

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    Have you tried debugging your code at all?

    In the routine fnctGetStaffData is where you calculate current leave based on an array formula using data on very hidden sheet Leave.
    There is no data on that sheet so the calculation is correct.

    maybe you should be storing something on the sheet before you calculate the days?

    I think you need to speak with the guy that wrote the code in order to progress any further with this.

    I am unable to speak to the person that wrote the code as he left the company years ago

    I have tried debugging but nothing highlights as it thinks all is ok

    Last edited by 5haks; 08-16-2017 at 04:24 AM.


  38. 08-16-2017, 04:51 AM


    #38

    Re: «run-time error ‘380’- invalid property value

    You are not looking for a raised error or syntax error in code, as they would be hilighted

    You are looking for a flaw in the logic of the program. In this case expecting holidays to be subtracted from maximum allowance when no holidays are present.

    I think your task goes beyond what a forum/I can do. You need somebody who can understand the requirement of the program and then sort out the problem.


  39. 08-16-2017, 09:35 AM


    #39

    5haks is offline


    Registered User


    Re: «run-time error ‘380’- invalid property value

    Quote Originally Posted by Andy Pope
    View Post

    You are not looking for a raised error or syntax error in code, as they would be hilighted

    You are looking for a flaw in the logic of the program. In this case expecting holidays to be subtracted from maximum allowance when no holidays are present.

    I think your task goes beyond what a forum/I can do. You need somebody who can understand the requirement of the program and then sort out the problem.

    Thanks for all your help Andy.
    Please mark this as resolved


  40. 08-16-2017, 11:04 AM


    #40

    Re: «run-time error ‘380’- invalid property value

    You have to do that as the OP

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.


Понравилась статья? Поделить с друзьями:
  • Ошибка 400 4 game
  • Ошибка 38 при отправке смс тинькофф
  • Ошибка 400 при установке поинт бланк
  • Ошибка 40 не удалось открыть подключение к sql server
  • Ошибка 4 приора на приборке не заводится