Beakerboy / Beakerboy/Vba-Types

Create a VBAVariable object

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The variable declared type affects the behavior of the value and how it is Let-Coerced. Example:

This is valid because Temp is a Variant
```vba
Function Foo()
Temp = 10
Foo = Temp <> ""
End Function
```
This gives a type mismatch error:
```vba
Function Foo()
Dim Temp as Integer
Temp = 10
Foo = Temp <> ""
End Function
```
But this works:
```vba
Function Foo()
Dim Temp as Integer
Dim Str as Variant
Temp = 10
Str = ""
Foo = Temp <> Str
End Function
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.