Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default assign value to cell in another worksheet

dear all,
when i click the button the word sample will appear in a cell in other
worksheet. below is lacking the info. Pls help


Private Sub CommandButton_Click()

Range("D2").Value = "Sample"

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default assign value to cell in another worksheet


In your code the word sample is placed in the active sheet.

To place the word sample in a specafic sheet use

Sheets("sheet1").range("d2").value = "sample"

or

workSheets("sheet1").range("d2").value = "sample"

You can also specify a workbook by

workbook("book1").Sheets("sheet1").range("d2").val ue = "sample

--
mudrake
-----------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...nfo&userid=247
View this thread: http://www.excelforum.com/showthread.php?threadid=26945

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default assign value to cell in another worksheet

Hi
see your other post

--
Regards
Frank Kabel
Frankfurt, Germany

"tango" schrieb im Newsbeitrag
...
dear all,
when i click the button the word sample will appear in a cell in

other
worksheet. below is lacking the info. Pls help


Private Sub CommandButton_Click()

Range("D2").Value = "Sample"

End Sub


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
i want to assign a cell to save a worksheet John Petranek Excel Worksheet Functions 2 March 14th 09 05:06 AM
Place a button on a worksheet and assign a macro to it? PFB New Users to Excel 7 December 18th 08 03:28 PM
assign the same macro to every line in worksheet Hannah Excel Worksheet Functions 1 May 22nd 07 10:11 AM
assign cell selection order in protected Excel worksheet tom92 Excel Discussion (Misc queries) 1 April 4th 05 05:57 PM
Assign a name to worksheet tabs by code Kat[_5_] Excel Programming 0 April 9th 04 08:21 PM


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

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"