ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Goto ("A1") in non active sheet (https://www.excelbanter.com/excel-programming/411309-goto-a1-non-active-sheet.html)

Les

Goto ("A1") in non active sheet
 
Hello all, i have a number of sheets that i am putting data in, but each
sheet is not active when i do that. The sheet name is variable "s", is it
possible to select "A1" on these sheets without activating them ?

I have tried

sheets(s).range("A1").select and

workbooks("Name"").sheets(s")Range("A1").select

without success ???
--
Les

Slick user

Goto ("A1") in non active sheet
 
I always select that sheet first then select the range.

I'm not using VB, but here is some translation without testing it.

Sheets(s).Select
ActiveSheet.Range("A1").Select

--
Slickuser


"Les" wrote:

Hello all, i have a number of sheets that i am putting data in, but each
sheet is not active when i do that. The sheet name is variable "s", is it
possible to select "A1" on these sheets without activating them ?

I have tried

sheets(s).range("A1").select and

workbooks("Name"").sheets(s")Range("A1").select

without success ???
--
Les


Les

Goto ("A1") in non active sheet
 
Hi SlickUser, i know it works if i activate the sheet but do not want to do
that as i am assuming that it will slow my code down ??
--
Les


"Slick user" wrote:

I always select that sheet first then select the range.

I'm not using VB, but here is some translation without testing it.

Sheets(s).Select
ActiveSheet.Range("A1").Select

--
Slickuser


"Les" wrote:

Hello all, i have a number of sheets that i am putting data in, but each
sheet is not active when i do that. The sheet name is variable "s", is it
possible to select "A1" on these sheets without activating them ?

I have tried

sheets(s).range("A1").select and

workbooks("Name"").sheets(s")Range("A1").select

without success ???
--
Les


Norman Jones[_2_]

Goto ("A1") in non active sheet
 
Hi Les,

Try something like:

ThisWorkbook.Sheets("s"). _
Range("A1").Value = "Your value"


---
Regards.
Norman


"Les" wrote in message
...
Hello all, i have a number of sheets that i am putting data in, but each
sheet is not active when i do that. The sheet name is variable "s", is it
possible to select "A1" on these sheets without activating them ?

I have tried

sheets(s).range("A1").select and

workbooks("Name"").sheets(s")Range("A1").select

without success ???
--
Les




All times are GMT +1. The time now is 04:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com