Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with macro to give a message box


Hello frineds,
I was looking for a small macro that will give a error message if th
value of cells in column M & J is same.
Here is the main problem..
This macro should get activated with a check box present in each row

--
nik_gujarath
-----------------------------------------------------------------------
nik_gujarathi's Profile: http://www.excelforum.com/member.php...fo&userid=3452
View this thread: http://www.excelforum.com/showthread.php?threadid=54372

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Help with macro to give a message box

Add checkboxes from the forms toolbar, then assign each checkbox to this
macro

Sub CheckValues()
Dim oCheckbox As CheckBox
Dim iRow As Long
With ActiveSheet
Set oCheckbox = .CheckBoxes(Application.Caller)
If oCheckbox.Value = xlOn Then
iRow = oCheckbox.TopLeftCell.Row
If .Cells(iRow, "J").Value = .Cells(iRow, "M").Value Then
MsgBox "Same on row " & iRow
End If
End If
End With
End Sub



--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"nik_gujarathi"
wrote in message
news:nik_gujarathi.2825yy_1148048124.3395@excelfor um-nospam.com...

Hello frineds,
I was looking for a small macro that will give a error message if the
value of cells in column M & J is same.
Here is the main problem..
This macro should get activated with a check box present in each row.


--
nik_gujarathi
------------------------------------------------------------------------
nik_gujarathi's Profile:

http://www.excelforum.com/member.php...o&userid=34522
View this thread: http://www.excelforum.com/showthread...hreadid=543727



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help with macro to give a message box

You have a checkbox in each row and if it is checked or unchecked (or just
checked?) you want it to fire a macro that puts up a msgbox if the value in
columns M and J of that row have the same value. What kind of checkbox - is
it from the control toolbox toolbar or the forms toolbar (the forms toolbar
checkbox would be much more adaptable to this requirement)?

--
Regards,
Tom Ogilvy


"nik_gujarathi" wrote:


Hello frineds,
I was looking for a small macro that will give a error message if the
value of cells in column M & J is same.
Here is the main problem..
This macro should get activated with a check box present in each row.


--
nik_gujarathi
------------------------------------------------------------------------
nik_gujarathi's Profile: http://www.excelforum.com/member.php...o&userid=34522
View this thread: http://www.excelforum.com/showthread...hreadid=543727


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with macro to give a message box


Tom,
The value of cells in column M and J is linked to checkbox. When
chech the first box, the value of cell in column M becomes "TRUE", bu
when it is unchecked it is "False". Same is with the second checkbox
The second check box is linked with cells in column J. I want the use
to check only one box in each row. I know I can do it by using th
Option Button & group box, but there are some other macros whic
prohibits me using the group box. Hence I am using the check bo
option.
I have used check box from the Form toolbar. Hence I was looking for
macro which will get fired with any of the check box & will give me a
error message if the user checks both the boxes


Tom Ogilvy Wrote:
You have a checkbox in each row and if it is checked or unchecked (o
just
checked?) you want it to fire a macro that puts up a msgbox if th
value in
columns M and J of that row have the same value. What kind of checkbo
- is
it from the control toolbox toolbar or the forms toolbar (the form
toolbar
checkbox would be much more adaptable to this requirement)?

--
Regards,
Tom Ogilvy


"nik_gujarathi" wrote:


Hello frineds,
I was looking for a small macro that will give a error message i

the
value of cells in column M & J is same.
Here is the main problem..
This macro should get activated with a check box present in eac

row.


--
nik_gujarathi


------------------------------------------------------------------------
nik_gujarathi's Profile

http://www.excelforum.com/member.php...o&userid=34522
View this thread

http://www.excelforum.com/showthread...hreadid=543727



--
nik_gujarath
-----------------------------------------------------------------------
nik_gujarathi's Profile: http://www.excelforum.com/member.php...fo&userid=3452
View this thread: http://www.excelforum.com/showthread.php?threadid=54372

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
If WB not there; give message: What am I doing wrong? RGreen New Users to Excel 3 September 9th 09 10:04 PM
How to give an error message if a cell value entered is larger than permitted Colin Hayes Excel Discussion (Misc queries) 7 May 16th 07 02:39 PM
Record a macro to use in any workbook--give it to others. cj Excel Discussion (Misc queries) 1 March 12th 07 07:36 PM
Give RELEVANT responses to questions. DO NOT give usless list pmartin Excel Worksheet Functions 2 July 6th 06 06:08 PM
Why does this statement give an error message? George Furnell[_2_] Excel Programming 2 February 18th 06 02:43 PM


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