ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Select a cell/row (https://www.excelbanter.com/excel-discussion-misc-queries/185465-select-cell-row.html)

Leanne M (Aussie)

Select a cell/row
 
I have the following code and when the data form opens I want it to be on the
first record. I thought I could enter something like
Range("A3").Select - just before the data form line
but I get an error - Select method of range class failed.


Private Sub CommandButton5_Click()
Sheets("Internal Sales Report").Visible = True
Sheets("Internal Sales Report").Select
Application.Run "ShowDataForm"
End Sub

Most of you will know that I am fairly new at this so thought I was taking
an educated guess! Guess I am not that well eductaed yet.
--

Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)

Leanne M (Aussie)

Select a cell/row
 
I did it!

I thought about selecting the cell I want when I leave the sheet rather than
when I enter it and this works.

Sorry for wasting your time
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


"Leanne M (Aussie)" wrote:

I have the following code and when the data form opens I want it to be on the
first record. I thought I could enter something like
Range("A3").Select - just before the data form line
but I get an error - Select method of range class failed.


Private Sub CommandButton5_Click()
Sheets("Internal Sales Report").Visible = True
Sheets("Internal Sales Report").Select
Application.Run "ShowDataForm"
End Sub

Most of you will know that I am fairly new at this so thought I was taking
an educated guess! Guess I am not that well eductaed yet.
--

Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


Pete_UK

Select a cell/row
 
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


Well, there are worse places you could be !! <bg

Pete

Leanne M (Aussie)

Select a cell/row
 
Most definatly! In all honesty though I love it here
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


"Pete_UK" wrote:

United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


Well, there are worse places you could be !! <bg

Pete



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

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