excel model in spreadsheet won't operate

Copper Contributor

I spent 4hrs in chat yesterday with the Microsoft team. I use a model in excel format for achieving calculations of area based on a set of values input. The specific model I'm using won't run. I get a run time ERROR '13'. Apparently it is to do with a visual basics extension. I can send screen shote if you like.

1 Reply

@dave_1959 

A "Run-time Error '13'" in Excel typically indicates a mismatched data type. It could be caused by trying to perform an operation on data of one type as if it were another type. Without seeing the specific code or knowing more about the model you're using, it's a bit challenging to provide a precise solution. However, here are some general steps you can take to troubleshoot and resolve the issue:

  1. Check Data Types: Review the variables and data types used in your VBA code. Ensure that you're not trying to perform incompatible operations on different data types.
  2. Inspect the Code: Open the Visual Basic for Applications (VBA) editor (Alt + F11) and locate the code that is causing the error. Look for any statements that involve data type conversions or comparisons.
  3. Debugging: Use the VBA editor to set breakpoints in your code and step through it line by line. This can help you identify the exact line where the error is occurring. To set a breakpoint, click in the left margin next to the line you want to start debugging from.
  4. Variable Values: Inspect the values of variables at the point where the error occurs. You can use the Immediate Window (Ctrl + G) to print variable values by typing ? YourVariable and pressing Enter.
  5. Data Validation: Check that the data being used in calculations is valid and doesn't include unexpected characters or values.
  6. Update or Reinstall Macros: If the model relies on macros or VBA code, make sure that your Excel settings allow the execution of macros. You might need to enable macros and ActiveX controls.
  7. Office Repair: If the issue persists, you could try repairing your Microsoft Office installation. This can be done through the "Programs and Features" or "Add or Remove Programs" section in your computer's control panel. The text was revised with the AI.

 

With your permission, If these steps not help you to solve your problem, I recommend to provide more information.

You'll get a quicker and more accurate answer, and those who want to help don't have to invest time guessing the problem.

I recommend: Always inform about your Excel version, operating system, storage medium/hard drive, OneDrive, Sharepoint, etc.).

If possible, add a file (without sensitive data) and use this file to describe your project step by step, or add photos with the appropriate description.

Don't forget that not every Excel user has a clue about every job and what you see he can't see:smile:.

 

In this link you will find some more information about it:

Welcome to your Excel discussion space!

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

 

Was the answer useful? Mark as best response and like it!

This will help all forum participants.