Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Performing codes on different worksheets

Anyone knows how to select a worksheet and perform
subsequent operations from that worksheet?

Ive used the below code to test out:
Sheets("Average(daily)").Select
Cells(10, 10).Value = 1

What it does is that it selects "average(daily)"
worksheet, but continues to change the value of cell
(10,10) of the original worksheet. How do I get it to work
on the new worksheet, "Average(daily)"?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Performing codes on different worksheets

You can avoid the select:

Sheets("Average(daily)").Cells(10, 10).Value = 1

or
with Sheets("Average(daily)")
.Select
.Cells(10, 10).Value = 1
end with

It looks like your code is behind a worksheet (event code or assigned to a
control from the control toolbox toolbar).

Unqualified ranges refer to the sheet that owns the code. In a general module,
unqualified ranges refer to the activesheet.



Darren wrote:

Anyone knows how to select a worksheet and perform
subsequent operations from that worksheet?

Ive used the below code to test out:
Sheets("Average(daily)").Select
Cells(10, 10).Value = 1

What it does is that it selects "average(daily)"
worksheet, but continues to change the value of cell
(10,10) of the original worksheet. How do I get it to work
on the new worksheet, "Average(daily)"?


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Performing codes on different worksheets

Hi Darren

works fine for me ... as you've written it, but how about
simply
Sheets("Average(daily)").Cells(10, 10).Value = 1

Cheers
JulieD


"Darren" wrote in message
...
Anyone knows how to select a worksheet and perform
subsequent operations from that worksheet?

Ive used the below code to test out:
Sheets("Average(daily)").Select
Cells(10, 10).Value = 1

What it does is that it selects "average(daily)"
worksheet, but continues to change the value of cell
(10,10) of the original worksheet. How do I get it to work
on the new worksheet, "Average(daily)"?



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
Locating the max value AND performing a fn on it only Pradhan Excel Discussion (Misc queries) 3 July 22nd 09 01:09 AM
performing regression cf New Users to Excel 1 December 26th 08 04:10 PM
Performing calculations if a value is between A and B M. Nelson Excel Worksheet Functions 3 September 12th 08 04:35 PM
Cell Size Between Worksheets when performing a copy and paste Kara Excel Discussion (Misc queries) 1 October 27th 06 04:08 AM
performing least squares Darius Blaszijk Excel Discussion (Misc queries) 5 March 19th 05 07:25 PM


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