ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Problem undstanding how to apply a code (https://www.excelbanter.com/excel-discussion-misc-queries/207218-problem-undstanding-how-apply-code.html)

Brenda

Problem undstanding how to apply a code
 
I want to set up this code:
Private Sub Workbook_Open()
Sheets("HerdDescription").ScrollArea = "N1:N25"
End Sub

However i am not sure how about applying it to the correct sheet. I have
hidden the rows and columns however i can still scroll and i don't want to do
that. I have been ready others replies but i am lost on the applying part.
Can someone help me.
--
Thank you, Brenda

Jim Thomlinson

Problem undstanding how to apply a code
 
That code must be put into the ThisWorkbook Code Module. The easiest way to
get there is from XL right click on the XL Icon in the upper left corner of
the window. Select View Code. This will open the VBA screen and take you
directly into the ThisWorkbook module. Past the code there. If that code is
pasted into a regular module it will not be executed so it will not do much...

As for the sheet the sheet is defined right in the code
Sheets("HerdDescription").
so it will operate on that sheet.
--
HTH...

Jim Thomlinson


"Brenda" wrote:

I want to set up this code:
Private Sub Workbook_Open()
Sheets("HerdDescription").ScrollArea = "N1:N25"
End Sub

However i am not sure how about applying it to the correct sheet. I have
hidden the rows and columns however i can still scroll and i don't want to do
that. I have been ready others replies but i am lost on the applying part.
Can someone help me.
--
Thank you, Brenda


Brenda

Problem undstanding how to apply a code
 
I still must be doing something wrong. I followed your instructions however,
nothing has happened do i need to save exit and then go back in to make it
work? Sorry to be so dumb on this i am very new at doing this.
--
Thank you, Brenda


"Jim Thomlinson" wrote:

That code must be put into the ThisWorkbook Code Module. The easiest way to
get there is from XL right click on the XL Icon in the upper left corner of
the window. Select View Code. This will open the VBA screen and take you
directly into the ThisWorkbook module. Past the code there. If that code is
pasted into a regular module it will not be executed so it will not do much...

As for the sheet the sheet is defined right in the code
Sheets("HerdDescription").
so it will operate on that sheet.
--
HTH...

Jim Thomlinson


"Brenda" wrote:

I want to set up this code:
Private Sub Workbook_Open()
Sheets("HerdDescription").ScrollArea = "N1:N25"
End Sub

However i am not sure how about applying it to the correct sheet. I have
hidden the rows and columns however i can still scroll and i don't want to do
that. I have been ready others replies but i am lost on the applying part.
Can someone help me.
--
Thank you, Brenda


Jim Thomlinson

Problem undstanding how to apply a code
 
That will do it. The other option is just to go the the VBE and put your
cursor in the procedure somewhere and hit F5 to execute the code.
--
HTH...

Jim Thomlinson


"Brenda" wrote:

I still must be doing something wrong. I followed your instructions however,
nothing has happened do i need to save exit and then go back in to make it
work? Sorry to be so dumb on this i am very new at doing this.
--
Thank you, Brenda


"Jim Thomlinson" wrote:

That code must be put into the ThisWorkbook Code Module. The easiest way to
get there is from XL right click on the XL Icon in the upper left corner of
the window. Select View Code. This will open the VBA screen and take you
directly into the ThisWorkbook module. Past the code there. If that code is
pasted into a regular module it will not be executed so it will not do much...

As for the sheet the sheet is defined right in the code
Sheets("HerdDescription").
so it will operate on that sheet.
--
HTH...

Jim Thomlinson


"Brenda" wrote:

I want to set up this code:
Private Sub Workbook_Open()
Sheets("HerdDescription").ScrollArea = "N1:N25"
End Sub

However i am not sure how about applying it to the correct sheet. I have
hidden the rows and columns however i can still scroll and i don't want to do
that. I have been ready others replies but i am lost on the applying part.
Can someone help me.
--
Thank you, Brenda


Brenda

Problem undstanding how to apply a code
 
Finally got it to work but how come i can use my wheel on the mouse and still
scroll down. When i use the arrows on my keyboard it works like it is suppose
to.
--
Thank you, Brenda


"Jim Thomlinson" wrote:

That will do it. The other option is just to go the the VBE and put your
cursor in the procedure somewhere and hit F5 to execute the code.
--
HTH...

Jim Thomlinson


"Brenda" wrote:

I still must be doing something wrong. I followed your instructions however,
nothing has happened do i need to save exit and then go back in to make it
work? Sorry to be so dumb on this i am very new at doing this.
--
Thank you, Brenda


"Jim Thomlinson" wrote:

That code must be put into the ThisWorkbook Code Module. The easiest way to
get there is from XL right click on the XL Icon in the upper left corner of
the window. Select View Code. This will open the VBA screen and take you
directly into the ThisWorkbook module. Past the code there. If that code is
pasted into a regular module it will not be executed so it will not do much...

As for the sheet the sheet is defined right in the code
Sheets("HerdDescription").
so it will operate on that sheet.
--
HTH...

Jim Thomlinson


"Brenda" wrote:

I want to set up this code:
Private Sub Workbook_Open()
Sheets("HerdDescription").ScrollArea = "N1:N25"
End Sub

However i am not sure how about applying it to the correct sheet. I have
hidden the rows and columns however i can still scroll and i don't want to do
that. I have been ready others replies but i am lost on the applying part.
Can someone help me.
--
Thank you, Brenda



All times are GMT +1. The time now is 10:52 AM.

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