Jack.
Jack.

Reputation: 69

Excel Function call

I want to do something like below. Why is the clearing not working?

Function bd() As Integer
Dim a As Integer
Call lol
End Function


Sub lol()
Sheets("Risk Analytics").Range("A1", "F99999").Clear
End Sub

Upvotes: 0

Views: 46

Answers (1)

Shiva
Shiva

Reputation: 20965

For Range.Clear, the start and end cell addresses are separated by a :. Like so

Sub lol()
    Sheets("Risk Analytics").Range("A1:F99999").Clear
End Sub

Upvotes: 2

Related Questions