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: 175
Default Use code in a modul

Hi i use this on a checkbox event
Dim i As Integer
Dim a As Integer
a = 0
For i = 1 To 4
If Me.Controls("chk_ci" & i).Value = True Then
a = a + 1
End If
Next

This works but if i make the code in a modul and use it
i get an error on ME - and if i delete me I get an error on Controls
and if I just use :
If "chk_ci" & i.Value = True Then

Then i get an error on the varable i

Can someone help here?

Alvin

 
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
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Excel Programming 3 December 11th 06 05:14 AM
Change name on modul Arne Hegefors Excel Programming 2 August 28th 06 03:59 PM
User form/Modul Jenni_Sweden Excel Programming 1 June 15th 06 04:14 PM
File protect via extern USB crypto modul? frenic[_4_] Excel Programming 3 November 9th 05 12:56 AM
Error message:"Compile error modul 1" Jonsson[_39_] Excel Programming 1 July 16th 04 10:01 PM


All times are GMT +1. The time now is 11:17 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"