Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default trying to put a check box in each shell with vba

any ideas


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/30/2004 by me
'

'
On Error Resume Next
ActiveSheet.OLEObjects.Add(ClassType:="Forms.Check Box.1", Link:=False, _
DisplayAsIcon:=False, Left:=218.25, Top:=12, Width:=21, Height:=13.5) _
.Select
End Sub
Sub FormatRange()
With Worksheets("29-Dec-1900").Range("A1:G1000")
Module2.Macro1
End With
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default trying to put a check box in each shell with vba

Rob,

It's gonna be slow!

Sub Macro1(cell As Range)
Dim myObj
On Error Resume Next
Set myObj = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Check Box.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=cell.Left, _
Top:=cell.Top, _
Width:=cell.Width, _
Height:=13.5)
End Sub

Sub FormatRange()
Dim cell As Range
Application.ScreenUpdating = False
With Worksheets("29-Dec-1900")
For Each cell In Range("A1:G100")
Macro1 cell
Next cell
End With
Application.ScreenUpdating = True
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"rob merritt" wrote in message
m...
any ideas


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/30/2004 by me
'

'
On Error Resume Next
ActiveSheet.OLEObjects.Add(ClassType:="Forms.Check Box.1", Link:=False,

_
DisplayAsIcon:=False, Left:=218.25, Top:=12, Width:=21,

Height:=13.5) _
.Select
End Sub
Sub FormatRange()
With Worksheets("29-Dec-1900").Range("A1:G1000")
Module2.Macro1
End With
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default trying to put a check box in each shell with vba


Thanks Bob

that works great, I also used it to insert a combo box in the cells too
(this is a one shot thinn to build a static ss)


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default trying to put a check box in each shell with vba

You are welcome Rob. Thanks for the update.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"rob merritt" wrote in message
...

Thanks Bob

that works great, I also used it to insert a combo box in the cells too
(this is a one shot thinn to build a static ss)


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply
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
Shell function John Keturi Excel Programming 1 May 23rd 04 02:09 AM
run awk95 using Shell() L Mehl Excel Programming 3 March 3rd 04 06:50 PM
Shell Joseph[_12_] Excel Programming 1 February 1st 04 04:33 AM
Shell function II [email protected] Excel Programming 1 September 19th 03 05:55 PM
Shell Statement Confused@424 Excel Programming 1 August 13th 03 08:19 PM


All times are GMT +1. The time now is 08:01 PM.

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"