User-defined type not defined

ShogunStealth

New Member
Joined
Nov 6, 2021
Messages
23
Office Version
  1. 2019
Platform
  1. Windows
I have recommenced on a path to learn about VBA and remembered how exciting it is coding and when everything is going great but also how frustrating when they don't :). I recent begun a project were I would take some raw data in a XLSX format (1000's of lines) and do a number of computations on the columns with VBA formatting, sorting and filtering the data in a particular way. The raw data on USB drive contains several files unfortunately I can not share these files. I had successfully planned to built a XLB to share the code with other people I work with, then about a week ago roughly after blackout and my virtual session with my work blue screen of death cause my laptop to crash when I was working on the project. I begun to receive a peculiar error "User-defined type not defined" seemingly out of the no where.

I conducted a number of tests to isolate the issue. Here what I have done;
  • I have removed all modules in the vba editor - after saving them of course :)
  • Removed the Personal.xlb file from XLSTART in my roaming profile
  • re booted
This is how the error appears which is really strange, when I open any of the files on the USB even if copy them to my desktop [local copy] there is no issue when I start typing in any of the cells even it is is plain text in either a blank or and existing cell, all good. However I select "Developer" tab then press the button in the ribbon "Visual Basic" then go back the spreadsheet and type just plain text like "cow" not even a formula in another cell I get this error (image attached). It only occurs on the raw data files that either on or from the USB. It doesn't happen with and new empty files or files I have on my laptop. Btw selecting Ok allows the entry until I type in the next cell.

Please note it is NOT a "Compile" error in which 100's or help is available but nothing for this

To be clear there is no more vba code, it s been removed. Is it possible I have some corruption in the application? I had no issue with these files previously but only after BSOD. I would appreciate any thoughts and help
 

Attachments

  • Screenshot 2021-11-06 162137.jpg
    Screenshot 2021-11-06 162137.jpg
    7.6 KB · Views: 65
What does anyone know about the following?

Attribute Macro2.VB_ProcData.VB_Invoke_Func = " \n14"

I found this inside some of subs and an obscure post from someone - The n14 part means that the macro or function is in the numbered category 14. Which is "User Defined" functions.

Is it possible this line code that doesn't appear in my VBE but when I open my saved inside modules in Notepad++ from files in Personal.xlsb that when I crashed in my earlier posts?
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Thanks everyone, I don't know that I have identified the source of this issue but have moved on and have no reason to keep this thread open.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top