Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default 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








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default 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?

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default 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.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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








  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default 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












  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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.



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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










  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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.



  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Screen viewing

That did the trick! Thanks!


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



  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default 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.






  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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.





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
Viewing data on computer screen Ann Davidson Excel Discussion (Misc queries) 2 October 26th 07 04:58 PM
Viewing a worksheet on a large projection screen Jim Patterson Excel Discussion (Misc queries) 2 November 22nd 06 07:30 PM
print box opens in right screen of dual screen setup why gerrys Excel Discussion (Misc queries) 1 June 30th 06 06:47 PM
Viewing 2 seperate spreadsheets on the screen simultaneously Joe31 Excel Discussion (Misc queries) 2 March 22nd 06 05:43 PM
How to copy data from excel to power point screen by screen? luvgreen[_3_] Excel Programming 0 April 9th 04 03:51 PM


All times are GMT +1. The time now is 02:14 AM.

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"