LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default what type of variable is this?

I am currently writing code in my Worksheet_Change()
as follows:

Private Sub Worksheet_Change (ByVal Target as Range)
For Each t in Target
' Do stuff
Next
End Sub


If I decide to use "Option Explicit" in this module, I believe
that the compiler will ask me to declare the variable "t"
above. What type should I declare "t"?? Should it
be "Dim t as Range"??? or "Dim t as Variant"??? or
something else?


thank u

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What Variable-type should I use Michelle Excel Programming 3 February 4th 09 02:17 PM
Variable type Alan Beban[_2_] Excel Programming 2 September 17th 07 06:13 PM
Type of variable J@Y Excel Programming 3 August 14th 07 04:14 PM
Variable type Confusion D Zandveld Excel Programming 2 March 5th 07 09:07 AM
Trouble with variable type Ken McLennan[_3_] Excel Programming 2 June 2nd 04 08:04 AM


All times are GMT +1. The time now is 06:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"