Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a UDF below that is located in a Standard Module.
Type Totals COGS As Double Material As Double Labor As Double UnitPrice As Currency QuotePrice As Currency End Type I declared a Public Variable in another Standard Module like this. Public Total As Totals For some reason when I use Total with the With...End With Statement in the code below VBA is throwing an exception stating "With object must be user-defined type, variant or object". Anybody know why? Sub Test() With Total ' determines labor effiency % and COGS % Select Case Val(tbxQuantity) Case Is = 1 .COGS = 1.1 Case Is = 2 .COGS = 1.08 Case Is = 3 .COGS = 1.05 End Select .Material = 300 .Labor = 1000 End With End Sub -- Cheers, Ryan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compile error: User-defined type not defined | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
Workspace faux user-defined type not defined | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming | |||
Word.Document - user defined type not defined | Excel Programming |