Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Return Focus

I am checking cells for null values. I have the before close event. If a cell
is found to be null then it cancels the close event. After the user clicks OK
I would like it to return focus back to the Cells(rownumber, 8). Meaning
return focus by the cell appearing with the bold outline with the cusor
blinking in the cell.

If Cells(rowNumber, 8) = "" And Cells(rowNumber, 9) = "" And
Cells(rowNumber, 10) = "" Then
emptyRow = True
cancel = True
MsgBox "Status for Sheet " & s & " at Row " &
rowNumber & " Must Be Either Owning, Checking, or Loaned"
Exit Do
Sheets(s).Activate
noValue = rowNumber
End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Return Focus

After:
Sheets(s).Activate
insert:
Cells(rownumber,9).Select
--
Gary''s Student - gsnu200822


"Samuel Looney" wrote:

I am checking cells for null values. I have the before close event. If a cell
is found to be null then it cancels the close event. After the user clicks OK
I would like it to return focus back to the Cells(rownumber, 8). Meaning
return focus by the cell appearing with the bold outline with the cusor
blinking in the cell.

If Cells(rowNumber, 8) = "" And Cells(rowNumber, 9) = "" And
Cells(rowNumber, 10) = "" Then
emptyRow = True
cancel = True
MsgBox "Status for Sheet " & s & " at Row " &
rowNumber & " Must Be Either Owning, Checking, or Loaned"
Exit Do
Sheets(s).Activate
noValue = rowNumber
End If

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
Cancel Out of UserForm Return Focus Minitman Excel Programming 10 October 1st 08 05:44 AM
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
When I hit return in a multiline text box, focus goes to next text wbntravis Excel Programming 1 March 7th 07 09:51 AM
change event; return focus to original textbox matt Excel Programming 3 February 26th 07 02:57 AM
Return action when a selected cell has focus. Paul Excel Programming 3 November 22nd 04 04:51 PM


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