Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Raynard Fischer   on Nov 20 In MS Office Category.

  
Question Answered By: Julio Morgan   on Nov 20

The two "Public x" define different variables, not references to the same
one.

Leave the one in UserForm1 as it is. Remove the one from Module1.

A compile will now give you an error because x is not defined  in Module1.
This is correct  and shows  you that Option Explicit is doing its job.

Now, use "dot" notation in Module1 to access the x in UserForm1:

MsgBox (UserForm1.x)

Share: 

 

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

 


Tagged: