View Full Version : Solved: Select Row problem
Nader
02-14-2011, 02:20 AM
I tried this code to show message only if I select any row in a sheets else exit sub but didn't work
Dim wsh As Worksheet
If Not wsh.Rows.Select Then Exit Sub
MsgBox ("ok")
mdmackillop
02-14-2011, 02:30 AM
Put this in the ThisWorkbook module
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Dim Rws
Rws = Target.Cells.Count / Sh.Columns.Count
If Rws - Int(Rws) = 0 Then MsgBox Rws & " rows selected"
End Sub
Nader
02-14-2011, 05:20 AM
thank you for help!!
Nader
02-14-2011, 10:48 AM
thank you for help!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.