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: 31
Default VBA code causes Find and Replace dialog box to lose focus

Dear friends,

I have below event code in my worksheet which works perfectly but causes 2
known problems, i.e.,

1- "Find and Replace" dialog box loses focus once I do find search in the
worksheet.
2- When I delete a row in the worksheet, the code takes me to the end/debug
dialog box and on clicking end on this dialog box, selects the textbox I have
placed in my worksheet.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
If Not rngLast Is Nothing Then
ActiveSheet.Shapes("TextBox").Select
Selection.Characters.Text = rngLast(1, 6).Value
End If
Set rngLast = Target
rngLast.Select
Application.ScreenUpdating = True
Shapes("TextBox").SetShapesDefaultProperties
End Sub

I am using win xp sp3 and office 2007. I have limited knowledge about vba
and need your kind help.

TIA
Shahbaz
 
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
Find/Replace in VBE takes focus off window Excel 2003 ward376 Excel Programming 0 January 18th 07 11:14 PM
FIND AND REPLACE DIALOG BOX MoreGOOFS Excel Discussion (Misc queries) 1 June 24th 06 12:46 PM
Excel Find/Replace Dialog Box ajaxford Excel Discussion (Misc queries) 2 June 16th 06 06:28 AM
Replace dialog should put focus on "Find What" not "Replace With" Michael Williams Excel Discussion (Misc queries) 0 May 24th 06 12:45 PM
Pulling up the Find and Replace Dialog via Code kraljb[_19_] Excel Programming 1 January 11th 06 09:23 PM


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