ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select a cell (https://www.excelbanter.com/excel-programming/322892-select-cell.html)

Rob

Select a cell
 
'I want to set thye selected cell on sheet1 without having to select the
sheet. Anyone know how?

sheet1.select
sheet1.cells.select
sheet2.select
sheet1.cells(1,1).select 'won't let me do this.

Thanks
Rob

JulieD

Select a cell
 
Hi Rob

maybe if you can tell us what you're trying to achieve we'll be able to come
up with an alternative method - because "select" is the same thing as you
clicking on a cell - and you can't click on a cell in a sheet that isn't
selected.

Cheers
JulieD

"Rob" wrote in message
...
'I want to set thye selected cell on sheet1 without having to select the
sheet. Anyone know how?

sheet1.select
sheet1.cells.select
sheet2.select
sheet1.cells(1,1).select 'won't let me do this.

Thanks
Rob




Rob

Select a cell
 
ok: Excel remembers what you last had selected on a sheet. I'm going to
send several sheets out as a report. With my macro, I copy-paste values
without selecting the sheet, which changes what excel is remembering. Now
when the person receives the report, and activates the sheet, the whole sheet
is selected. Instead of this I'd like just cell A1 to be selected. I could
use screenupdating, but I'd rather do it without ever having to activate the
sheet, even invisibly.


"JulieD" wrote:

Hi Rob

maybe if you can tell us what you're trying to achieve we'll be able to come
up with an alternative method - because "select" is the same thing as you
clicking on a cell - and you can't click on a cell in a sheet that isn't
selected.

Cheers
JulieD

"Rob" wrote in message
...
'I want to set thye selected cell on sheet1 without having to select the
sheet. Anyone know how?

sheet1.select
sheet1.cells.select
sheet2.select
sheet1.cells(1,1).select 'won't let me do this.

Thanks
Rob





JulieD

Select a cell
 
Hi Rob

you could put a code against a worksheet_activate event so that when they
select the sheet the cursor goes to cell A1.
e.g.

Private Sub Worksheet_Activate()
Range("A1").Select
End Sub

-will this solve your problem?

Cheers
JulieD


"Rob" wrote in message
...
ok: Excel remembers what you last had selected on a sheet. I'm going to
send several sheets out as a report. With my macro, I copy-paste values
without selecting the sheet, which changes what excel is remembering. Now
when the person receives the report, and activates the sheet, the whole
sheet
is selected. Instead of this I'd like just cell A1 to be selected. I
could
use screenupdating, but I'd rather do it without ever having to activate
the
sheet, even invisibly.


"JulieD" wrote:

Hi Rob

maybe if you can tell us what you're trying to achieve we'll be able to
come
up with an alternative method - because "select" is the same thing as you
clicking on a cell - and you can't click on a cell in a sheet that isn't
selected.

Cheers
JulieD

"Rob" wrote in message
...
'I want to set thye selected cell on sheet1 without having to select
the
sheet. Anyone know how?

sheet1.select
sheet1.cells.select
sheet2.select
sheet1.cells(1,1).select 'won't let me do this.

Thanks
Rob







Rob

Select a cell
 
.....not really, that will mean cell A1 gets selected every time the user goes
to the sheet. I only want it to be selected the first time the user goes
into the report, as if I'd selected the cell before sending the report.

"JulieD" wrote:

Hi Rob

you could put a code against a worksheet_activate event so that when they
select the sheet the cursor goes to cell A1.
e.g.

Private Sub Worksheet_Activate()
Range("A1").Select
End Sub

-will this solve your problem?

Cheers
JulieD


"Rob" wrote in message
...
ok: Excel remembers what you last had selected on a sheet. I'm going to
send several sheets out as a report. With my macro, I copy-paste values
without selecting the sheet, which changes what excel is remembering. Now
when the person receives the report, and activates the sheet, the whole
sheet
is selected. Instead of this I'd like just cell A1 to be selected. I
could
use screenupdating, but I'd rather do it without ever having to activate
the
sheet, even invisibly.


"JulieD" wrote:

Hi Rob

maybe if you can tell us what you're trying to achieve we'll be able to
come
up with an alternative method - because "select" is the same thing as you
clicking on a cell - and you can't click on a cell in a sheet that isn't
selected.

Cheers
JulieD

"Rob" wrote in message
...
'I want to set thye selected cell on sheet1 without having to select
the
sheet. Anyone know how?

sheet1.select
sheet1.cells.select
sheet2.select
sheet1.cells(1,1).select 'won't let me do this.

Thanks
Rob







Rob

Select a cell
 
.....not really, that will mean cell A1 gets selected every time the user goes
to the sheet. I only want it to be selected the first time the user goes
into the report, as if I'd selected the cell before sending the report.

"JulieD" wrote:

Hi Rob

you could put a code against a worksheet_activate event so that when they
select the sheet the cursor goes to cell A1.
e.g.

Private Sub Worksheet_Activate()
Range("A1").Select
End Sub

-will this solve your problem?

Cheers
JulieD


"Rob" wrote in message
...
ok: Excel remembers what you last had selected on a sheet. I'm going to
send several sheets out as a report. With my macro, I copy-paste values
without selecting the sheet, which changes what excel is remembering. Now
when the person receives the report, and activates the sheet, the whole
sheet
is selected. Instead of this I'd like just cell A1 to be selected. I
could
use screenupdating, but I'd rather do it without ever having to activate
the
sheet, even invisibly.


"JulieD" wrote:

Hi Rob

maybe if you can tell us what you're trying to achieve we'll be able to
come
up with an alternative method - because "select" is the same thing as you
clicking on a cell - and you can't click on a cell in a sheet that isn't
selected.

Cheers
JulieD

"Rob" wrote in message
...
'I want to set thye selected cell on sheet1 without having to select
the
sheet. Anyone know how?

sheet1.select
sheet1.cells.select
sheet2.select
sheet1.cells(1,1).select 'won't let me do this.

Thanks
Rob







xlcharlie

Select a cell
 
Maybe I've misunderstood what you are trying to do. Why can't you just enter
code for the macro to select cell A1 before it's done running? Copy & paste
everything, then select cell A1, do whatever else you want, and end the macro
where you want.

You could also set the values of the cells rather than copy & paste which
may accomplish what you want without selecting the entire sheet.

"Rob" wrote:

....not really, that will mean cell A1 gets selected every time the user goes
to the sheet. I only want it to be selected the first time the user goes
into the report, as if I'd selected the cell before sending the report.

"JulieD" wrote:

Hi Rob

you could put a code against a worksheet_activate event so that when they
select the sheet the cursor goes to cell A1.
e.g.

Private Sub Worksheet_Activate()
Range("A1").Select
End Sub

-will this solve your problem?

Cheers
JulieD


"Rob" wrote in message
...
ok: Excel remembers what you last had selected on a sheet. I'm going to
send several sheets out as a report. With my macro, I copy-paste values
without selecting the sheet, which changes what excel is remembering. Now
when the person receives the report, and activates the sheet, the whole
sheet
is selected. Instead of this I'd like just cell A1 to be selected. I
could
use screenupdating, but I'd rather do it without ever having to activate
the
sheet, even invisibly.


"JulieD" wrote:

Hi Rob

maybe if you can tell us what you're trying to achieve we'll be able to
come
up with an alternative method - because "select" is the same thing as you
clicking on a cell - and you can't click on a cell in a sheet that isn't
selected.

Cheers
JulieD

"Rob" wrote in message
...
'I want to set thye selected cell on sheet1 without having to select
the
sheet. Anyone know how?

sheet1.select
sheet1.cells.select
sheet2.select
sheet1.cells(1,1).select 'won't let me do this.

Thanks
Rob








All times are GMT +1. The time now is 03:39 PM.

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