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: 2,069
Default check box Error

Here is the code I found on this site... and get and error on the last
line... starts with Shapes(Shapes.Count......

Any Ideas? Thanks so much!

Sub AddCheckBoxes()

'Add A Forms CheckBox

Dim Cell As Range
Dim Col As String
Dim LinkCol
Dim R As Long
Dim Value

Col = "B"
Value = "Mark"
LinkCol = "D"

For R = 1 To ActiveSheet.Cells(Rows.Count, Col).Row
Set Cell = ActiveSheet.Cells(R, Col)
If Cell.Value = Value Then
With ActiveSheet.Shapes
..AddFormControl xlCheckBox, Cell.Left, Cell.Top, Cell.Width,
Cell.Height
End With

Shapes(Shapes.Count).ControlFormat.LinkedCell = Cell.(R,
LinkCol).Address
End If
Next R

End Sub

 
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
Runtime 9 error Check. Mattlynn via OfficeKB.com Excel Worksheet Functions 2 September 23rd 09 10:59 AM
Error Check Dates jlclyde Excel Discussion (Misc queries) 1 December 22nd 08 09:13 PM
If statement error check lghovden06 Excel Worksheet Functions 1 July 9th 08 11:05 PM
Error check on sheet Steph[_3_] Excel Programming 5 June 15th 05 08:50 PM
Error check and resume Steve Excel Programming 22 August 7th 04 11:44 AM


All times are GMT +1. The time now is 04:07 AM.

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

About Us

"It's about Microsoft Excel"