LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
pt pt is offline
external usenet poster
 
Posts: 2
Default the default worksheet

hi,all:
I face a problem, I have a button control in worksheet 2,
and the code as below:

Private Sub CommandButton1_Click()
Worksheets(1).Activate
Cells(1, 1).Value = "kk"
End Sub

and It seems that worksheet 1 is activated ,but kk is
set at the worksheet 2's cell (1,1) not at the worksheet 1.
It seems that the defaultworksheet is not the active worksheet.
It is so strange. Why it is so?

many thanks,
PanTao


 
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
Default Settings for a New Worksheet billbrandi Excel Discussion (Misc queries) 1 September 25th 08 10:36 PM
Making a worksheet default Per[_2_] Excel Discussion (Misc queries) 1 March 28th 07 03:43 PM
How To Open First Worksheet By Default? Arif Excel Discussion (Misc queries) 3 August 1st 06 10:11 AM
default excel worksheet Jason - MR Excel Discussion (Misc queries) 4 December 27th 05 10:41 PM
Trying to set default Worksheet file name from C++/MFC Marc Applewhite Excel Programming 1 January 29th 05 11:14 PM


All times are GMT +1. The time now is 06:48 PM.

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"