6diegodiego9
Board Regular
- Joined
- Jan 9, 2018
- Messages
- 80
- Office Version
- 2016
- Platform
- Windows
Just write this code in a new module and launch a debug - compile:
It crashes my Excel on two different PCs.
I know that there are atleast three errors in this code: the named range "ABC" doesn't exist, xlTable.seq.rng doesn't exist and xlTable.rng is not defined.
Anyway, what's the cause of the crash?
VBA Code:
Option Explicit
Private Type seq
Count As Long
'rng As Range
End Type
Private Type xlTable
seq As seq
rng As Range
End Type
Sub REALE()
Dim dbl As Double: dbl = Sheet1.Range("ABC").Value2
Dim xlTable As xlTable
Set xlTable.seq.rng = xlTable.rng.Offset(0, 4)
End Sub
It crashes my Excel on two different PCs.
I know that there are atleast three errors in this code: the named range "ABC" doesn't exist, xlTable.seq.rng doesn't exist and xlTable.rng is not defined.
Anyway, what's the cause of the crash?