![]() |
Type mismatch error - New to VB, please help
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... |
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... |
All times are GMT +1. The time now is 11:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com