Thread
:
Type mismatch error - New to VB, please help
View Single Post
#
2
Posted to microsoft.public.excel.programming
Chip Pearson
external usenet poster
Posts: 7,247
Type mismatch error - New to VB, please help
What is "Action1"? For UBound to work, it needs to be an array, but for Text
and Copy, it needs to be a range (I assume).
--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
"Erin Simons" <Erin
wrote in message
...
My code is as follows. Please note that I can't get it to run past the
first
line so I wouldn't be surprised if it is all be wrong!!
Sub Button2_Click()
Worksheets("Minutes").Activate
For Counter = 0 To UBound(Action1)
If Actions1.Text Then
Actions1.Copy
End If
Next Counter
End Sub
I get a "type mismatch" error on the line:
For Counter = 0 To UBound(Action1)
and i'm unsure what is wrong with it. Action1 is the name I have given to
my range (I just selected the range and named it). What am I doing
wrong??
Thanks in Advance...
Reply With Quote
Chip Pearson
View Public Profile
Find all posts by Chip Pearson