Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Thelma Murray   on Jan 19 In MS Office Category.

  
Question Answered By: Riley-jack Johnson   on Jan 19

I've never seen a VBA "Global" dimension statement like you are trying
to use. I just declare the variable outside of a SUB or FUNCTION to
make it global. For example:

Dim strName As String
Sub DoThis()
strName = Range("A1").Address
DoThat
End Sub
Function DoThat()
MsgBox "Name: " & strName
End Function

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on trouble using globals Or get search suggestion and latest updates.


Tagged: