ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Screen viewing (https://www.excelbanter.com/excel-programming/320526-screen-viewing.html)

Grace[_4_]

Screen viewing
 
When my macro is done, I would like it to show certain columns of a sheet.
When I record the keystrokes to do this, it looks fine. But when the macro
runs automatically, it ends up a few columns over. Her is the code I
recorded. What variable could be messing me up ( I think I may have clicked
relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean



Tom Ogilvy

Screen viewing
 
If you want a certain cell selected

Sheet("Resource Hours").Select
Range("D1").Select

--
Regards,
Tom Ogilvy

"Grace" wrote in message
...
When my macro is done, I would like it to show certain columns of a sheet.
When I record the keystrokes to do this, it looks fine. But when the

macro
runs automatically, it ends up a few columns over. Her is the code I
recorded. What variable could be messing me up ( I think I may have

clicked
relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean





Sharad Naik

Screen viewing
 
What exactly you want to do?
Are you trying to show one after another column
selected, to the user?
Then you need to add code for timing.
Below example will select 1st column(Cell A1), and
then after every 1 second will go to B1,C1..Till J1 (10 columns)

ThisWorkbook.Worksheets("Sheet3").Select
ActiveSheet.Range("A1").Select
i = 1
myTime = Timer
Do Until i = 10
If Fix(Timer) = myTime Then
DoEvents
Else
ActiveCell.Next.Activate
i = i + 1
myTime = Timer
End If
Loop
End Sub

Sharad

"Grace" wrote in message
...
When my macro is done, I would like it to show certain columns of a sheet.
When I record the keystrokes to do this, it looks fine. But when the
macro runs automatically, it ends up a few columns over. Her is the code
I recorded. What variable could be messing me up ( I think I may have
clicked relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean




Grace[_4_]

Screen viewing
 
I also want that cell, say J1, to be in the top left corner. What else do I
need?

Thx

"Tom Ogilvy" wrote in message
...
If you want a certain cell selected

Sheet("Resource Hours").Select
Range("D1").Select

--
Regards,
Tom Ogilvy

"Grace" wrote in message
...
When my macro is done, I would like it to show certain columns of a
sheet.
When I record the keystrokes to do this, it looks fine. But when the

macro
runs automatically, it ends up a few columns over. Her is the code I
recorded. What variable could be messing me up ( I think I may have

clicked
relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean







Grace[_4_]

Screen viewing
 
No, nothing this complicated. I think Tom has it almost solved for me.
Thanks much!

"Sharad Naik" wrote in message
...
What exactly you want to do?
Are you trying to show one after another column
selected, to the user?
Then you need to add code for timing.
Below example will select 1st column(Cell A1), and
then after every 1 second will go to B1,C1..Till J1 (10 columns)

ThisWorkbook.Worksheets("Sheet3").Select
ActiveSheet.Range("A1").Select
i = 1
myTime = Timer
Do Until i = 10
If Fix(Timer) = myTime Then
DoEvents
Else
ActiveCell.Next.Activate
i = i + 1
myTime = Timer
End If
Loop
End Sub

Sharad

"Grace" wrote in message
...
When my macro is done, I would like it to show certain columns of a
sheet. When I record the keystrokes to do this, it looks fine. But when
the macro runs automatically, it ends up a few columns over. Her is the
code I recorded. What variable could be messing me up ( I think I may
have clicked relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean






Sharad Naik

Screen viewing
 
Oh oh!! OK
Try below:

Sheets("Resource Hours").Select
ActiveSheet.Range("A1").Select
ActiveWindow.SmallScroll ToRight:=9

Sharad

"Grace" wrote in message
...
I also want that cell, say J1, to be in the top left corner. What else do
I need?

Thx

"Tom Ogilvy" wrote in message
...
If you want a certain cell selected

Sheet("Resource Hours").Select
Range("D1").Select

--
Regards,
Tom Ogilvy

"Grace" wrote in message
...
When my macro is done, I would like it to show certain columns of a
sheet.
When I record the keystrokes to do this, it looks fine. But when the

macro
runs automatically, it ends up a few columns over. Her is the code I
recorded. What variable could be messing me up ( I think I may have

clicked
relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean









Chip[_3_]

Screen viewing
 
Grace, do you want the rows before J1 to be hidden? Or simpl the view
to start at J1 (i.e. you could scroll and still see A1-I1?


Chip[_3_]

Screen viewing
 
Because you can use:

Range("J1").Select
ActiveWindow.SmallScroll ToRight:=9

The second line there to sroll the window to the right. But the number
"9" I think may depend upon the screen size viewing it, but I am not
sure.


Tom Ogilvy

Screen viewing
 
application.Goto Sheet("Resource Hours").Range("J1"), True

--
Regards,
Tom Ogilvy



Grace" wrote in message
...
I also want that cell, say J1, to be in the top left corner. What else do

I
need?

Thx

"Tom Ogilvy" wrote in message
...
If you want a certain cell selected

Sheet("Resource Hours").Select
Range("D1").Select

--
Regards,
Tom Ogilvy

"Grace" wrote in message
...
When my macro is done, I would like it to show certain columns of a
sheet.
When I record the keystrokes to do this, it looks fine. But when the

macro
runs automatically, it ends up a few columns over. Her is the code I
recorded. What variable could be messing me up ( I think I may have

clicked
relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean









Sharad Naik

Screen viewing
 
Now, that's the simplest way Tom :-)

Sharad

"Tom Ogilvy" wrote in message
...
application.Goto Sheet("Resource Hours").Range("J1"), True

--
Regards,
Tom Ogilvy



Grace" wrote in message
...
I also want that cell, say J1, to be in the top left corner. What else
do

I
need?

Thx

"Tom Ogilvy" wrote in message
...
If you want a certain cell selected

Sheet("Resource Hours").Select
Range("D1").Select

--
Regards,
Tom Ogilvy

"Grace" wrote in message
...
When my macro is done, I would like it to show certain columns of a
sheet.
When I record the keystrokes to do this, it looks fine. But when the
macro
runs automatically, it ends up a few columns over. Her is the code I
recorded. What variable could be messing me up ( I think I may have
clicked
relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean











Grace[_4_]

Screen viewing
 
This does not seem to work. All I want to do is put cell O1 at the top left
corner of everyone's monitor. Isn't there a way to do that.

Anyone?
Thx

"Chip" wrote in message
oups.com...
Because you can use:

Range("J1").Select
ActiveWindow.SmallScroll ToRight:=9

The second line there to sroll the window to the right. But the number
"9" I think may depend upon the screen size viewing it, but I am not
sure.




Grace[_4_]

Screen viewing
 
I may have a different problem. When I stepped into the macro, I saw it
work. But when I run it, it just seems to ignore the commands to this one
sheet. The last few lines of the macro are (when the macro quits, and I go
back to the Resources sheet, which is the 2nd sheet a user would want to
look at, the cursor is in the last place where data was pasted into it):

ActiveCell.Offset(-1, 2).Range("A1").Select

brk2: Rem

Application.Goto Sheet("Resource Hours").Range("J1"), True

Sheets("Assessment Point Scoring").Select
End Sub

What could be wrong?

"Tom Ogilvy" wrote in message
...
application.Goto Sheet("Resource Hours").Range("J1"), True

--
Regards,
Tom Ogilvy



Grace" wrote in message
...
I also want that cell, say J1, to be in the top left corner. What else
do

I
need?

Thx

"Tom Ogilvy" wrote in message
...
If you want a certain cell selected

Sheet("Resource Hours").Select
Range("D1").Select

--
Regards,
Tom Ogilvy

"Grace" wrote in message
...
When my macro is done, I would like it to show certain columns of a
sheet.
When I record the keystrokes to do this, it looks fine. But when the
macro
runs automatically, it ends up a few columns over. Her is the code I
recorded. What variable could be messing me up ( I think I may have
clicked
relative references when I recorded the macro)?

Sheets("Resource Hours").Select
Application.Goto Reference:="R1C1"
ActiveCell.Next.Activate
ActiveCell.Next.Activate
ActiveCell.Next.Activate

Thanks
Dean











Grace[_4_]

Screen viewing
 
This is totally confusing. In other words, I'd like everyone to be able to
see a typical, decent numbered, block of cells starting with cell O1 at the
top-left corner, e.g., O1 through Y20.

Am I missing something?

D

"nope" wrote in message
...
you say " All I want to do is put cell O1 at the top left corner of
everyone's monitor"

A totally different approach would be to postion a textbox there and
then for the text have it =O1.

I use this on huge sheets with external ranges and use a formula to
tell the last invoice date in the range.
As I say, it is a different way to show the same thing.




Grace[_4_]

Screen viewing
 
That did the trick! Thanks!


"Chip" wrote in message
oups.com...
Range("J1").Select
ActiveWindow.ScrollColumn = ActiveCell.Column
ActiveWindow.ScrollRow = ActiveCell.Row




gocush[_29_]

Screen viewing
 
Sub XXX()

'Your Code

'show Cell "O1" in uppper left
ActiveWindow.ScrollColumn = "15"
ActiveWindow.ScrollRow = "1"
End Sub


"Grace" wrote:

This is totally confusing. In other words, I'd like everyone to be able to
see a typical, decent numbered, block of cells starting with cell O1 at the
top-left corner, e.g., O1 through Y20.

Am I missing something?

D

"nope" wrote in message
...
you say " All I want to do is put cell O1 at the top left corner of
everyone's monitor"

A totally different approach would be to postion a textbox there and
then for the text have it =O1.

I use this on huge sheets with external ranges and use a formula to
tell the last invoice date in the range.
As I say, it is a different way to show the same thing.





nope

Screen viewing
 
I have to apologize for so badly misunderstanding.

But I have a simple thing you might try.

Create a Custom View with the screen display set the way you
want...O1 in the top left corner.
Name it something i.e. "normal"
Then call that Custom View "normal" at the end of your macro.

You can also hide columns and rows you don't want displayed if you
want to specifically only show a range like O1:Y20. The Custom View
will keep that as well.

ScottD


"Grace" wrote:

This is totally confusing. In other words, I'd like everyone to be able to
see a typical, decent numbered, block of cells starting with cell O1 at the
top-left corner, e.g., O1 through Y20.

Am I missing something?

D

"nope" wrote in message
...
you say " All I want to do is put cell O1 at the top left corner of
everyone's monitor"

A totally different approach would be to postion a textbox there and
then for the text have it =O1.

I use this on huge sheets with external ranges and use a formula to
tell the last invoice date in the range.
As I say, it is a different way to show the same thing.







All times are GMT +1. The time now is 05:26 PM.

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