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: 1
Default Range().Select not working


Please help! I have a command button on a worksheet, that when the user
highlights a cell with an employee name in it and presses the button, it
takes them to a different worksheet, inputs the highlighted cell's value
into cell B1 (which is linked to a combobox) and then calls a macro.
The code for the command button is as follows:


Private Sub CommandButton1_Click() 'Employee Detail Button

' Lookup selected employee and load data on Employee Summary tab

Dim EmpLookup As Variant
EmpLookup = ActiveCell.Value
Sheets("Employee Summary").Select
On Error Resume Next
Range("B1").Select
ActiveCell.Value = EmpLookup
Call Load_Emp_Summary

End Sub


My problem is that when the sub is stepped through, the
Range("B1").Select line does not work (everything else does), and so
the name gets inputted into whatever cell happens to be highlighted in
the worksheet. Can anyone tell me why that line won't work? Is there
another way to force selection of cell B1? I am using Excel 2003...

Thanks,
Kez


--
clmarquez
------------------------------------------------------------------------
clmarquez's Profile: http://www.excelforum.com/member.php...o&userid=29386
View this thread: http://www.excelforum.com/showthread...hreadid=494049

 
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
range("a1").select not working tkaplan Excel Discussion (Misc queries) 3 October 27th 05 06:16 PM
range select not working with small sets Papa Jonah Excel Programming 0 November 18th 04 12:04 AM
Select Range - using Offset ( 40 ,0 ) - not working Buffyslay Excel Programming 4 October 8th 04 11:35 AM
Select Sheet then Select Range Gee[_2_] Excel Programming 3 May 27th 04 10:10 PM
Range().Select Not Working Chip Pearson Excel Programming 1 December 12th 03 02:21 PM


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