Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That did the trick! Thanks!
"Chip" wrote in message oups.com... Range("J1").Select ActiveWindow.ScrollColumn = ActiveCell.Column ActiveWindow.ScrollRow = ActiveCell.Row |
#15
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Viewing data on computer screen | Excel Discussion (Misc queries) | |||
Viewing a worksheet on a large projection screen | Excel Discussion (Misc queries) | |||
print box opens in right screen of dual screen setup why | Excel Discussion (Misc queries) | |||
Viewing 2 seperate spreadsheets on the screen simultaneously | Excel Discussion (Misc queries) | |||
How to copy data from excel to power point screen by screen? | Excel Programming |