Access Vba Dim As Worksheet. In VBA, you have two collections that can be a bit confusing at times. How to Set a Worksheet variable using VBA it's name or activesheet or from a property of another object.
In this tutorial find out why you need to use the DIM statement and when you should use SET instead. To give a very basic explanation on DIM we can take this as an example, for instance, we. Sheets("Locations") If ws Is Nothing Then Exit Sub 'possible way of handing no worksheet was.
In VBA, you have two collections that can be a bit confusing at times.
In this tutorial find out why you need to use the DIM statement and when you should use SET instead.
Sheets("Locations") If ws Is Nothing Then Exit Sub 'possible way of handing no worksheet was. The variable name can be anything you want as long as it is one word and does not match the name of any VBA function, class, or accessor (so you couldn't name your variable Worksheet or Sub). You can call this method with several parameters which affords.