ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need a Macro to Scroll to the left (https://www.excelbanter.com/excel-programming/410537-need-macro-scroll-left.html)

Don Lowe

Need a Macro to Scroll to the left
 
I need a Macro to scroll to the left a specifc amount of colunms without
changing the row I am on.

Doug Glancy

Need a Macro to Scroll to the left
 
Don,

Try this:

Sub ScrollLeft(lngColumns As Long)
ActiveWindow.SmallScroll Toleft:=lngColumns
End Sub

and call it like this:

Sub test()
ScrollLeft (5) 'adjust this number
End Sub

hth,

Doug

"Don Lowe" wrote in message
...
I need a Macro to scroll to the left a specifc amount of colunms without
changing the row I am on.




Don Lowe

Need a Macro to Scroll to the left
 
what do you mean call it like this?

What should I put if I need to shift to the right 25 colunms?

"Doug Glancy" wrote:

Don,

Try this:

Sub ScrollLeft(lngColumns As Long)
ActiveWindow.SmallScroll Toleft:=lngColumns
End Sub

and call it like this:

Sub test()
ScrollLeft (5) 'adjust this number
End Sub

hth,

Doug

"Don Lowe" wrote in message
...
I need a Macro to scroll to the left a specifc amount of colunms without
changing the row I am on.





Doug Glancy

Need a Macro to Scroll to the left
 
Don,

If it's always 25 columns then:

Sub Scroll25Left()
ActiveWindow.SmallScroll Toleft:=25
End Sub

hth,

Doug

"Don Lowe" wrote in message
...
what do you mean call it like this?

What should I put if I need to shift to the right 25 colunms?

"Doug Glancy" wrote:

Don,

Try this:

Sub ScrollLeft(lngColumns As Long)
ActiveWindow.SmallScroll Toleft:=lngColumns
End Sub

and call it like this:

Sub test()
ScrollLeft (5) 'adjust this number
End Sub

hth,

Doug

"Don Lowe" wrote in message
...
I need a Macro to scroll to the left a specifc amount of colunms without
changing the row I am on.







Don Lowe

Need a Macro to Scroll to the left
 
Thank you....... It worked great

"Doug Glancy" wrote:

Don,

If it's always 25 columns then:

Sub Scroll25Left()
ActiveWindow.SmallScroll Toleft:=25
End Sub

hth,

Doug

"Don Lowe" wrote in message
...
what do you mean call it like this?

What should I put if I need to shift to the right 25 colunms?

"Doug Glancy" wrote:

Don,

Try this:

Sub ScrollLeft(lngColumns As Long)
ActiveWindow.SmallScroll Toleft:=lngColumns
End Sub

and call it like this:

Sub test()
ScrollLeft (5) 'adjust this number
End Sub

hth,

Doug

"Don Lowe" wrote in message
...
I need a Macro to scroll to the left a specifc amount of colunms without
changing the row I am on.








All times are GMT +1. The time now is 03:11 AM.

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