Scrolling Area Code

May 29, 2008

I have a sheet in which I want to limit the scrolling area to B2:B60 & D2:H60, in other words I don't want to include neither A2:A60 nor C2:C60 in my scrolling area.

Is there a way to do this?

I know I can lock the cells, however, pre-existing code will not work if cells are locked.

View 9 Replies


ADVERTISEMENT

Limiting Scrolling Area On A Worksheet

Sep 18, 2008

When I limit the scrolling area in a worksheet, and it works there and then, when I close and reopen the whorkbook, the limiting does not work.

This is how I do it:-

I Right-click the sheet tab for the sheet which I want to place a limit.
In the resulting Context menu, I choose View Code. The VBA editor appears and asks for the password to view the code. I keyin the password

I then set in my limit as B2:O25

Then I close the VBA Editor and display the worksheet where I try and I find it working.

I close and save the workbook.

When I reopen the limiting has disaapeared!

View 9 Replies View Related

VBA Code To Disable Scrolling Up Or Down

Dec 30, 2011

What is the vba code to disable scrolling Up or down?

View 1 Replies View Related

Scrolling In UserForm Frame By A Code

Feb 28, 2010

Is it possible to scroll down in a UserForm Frame with a VBA Code in excel. My frame in the userform has a scroll height of 600 and a lot of option buttons. Based on a selection in a ComboBox(using If statement), I'd like to scroll down to a certain amount in the Frame.

View 7 Replies View Related

VBA Code For Set Print Area

Feb 6, 2014

Making a macro that selects active cells (so anything with text in) and sets that as the print area.

Using the default builder I have:

Range("A1:AA44").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=30
Range(Selection, Selection.End(xlUp)).Select
Range("A1:AA692").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$AH$692"

[Code]...

Can trim this code with something

Range("any containing data").Select
ActiveSheet.PageSetup.PrintArea = "selection"

View 1 Replies View Related

How To Set Print Area In Code

Jul 6, 2014

I have 2 codes that set up different "print areas". Every time i run one of the codes the print area doesn't get set unless i run the same code again. So if i run code A which will set the print area with no issues and then right afterwards i run code B then code B's print area won't get set unless i run code B a 2nd time. And if i now i run code A, the same issue happens and the print area to Code A won't get set properly unless i run the code again.

Here is part of the code that discusses the print area:

[Code] .....

View 6 Replies View Related

Print Area Code

May 7, 2008

I have some code to select a print area depending on wether or not there is data in a cell. The code I have so far partially works but not quite like I need it to. Here's what I have,

Sub selectprintarea()
Select Case True

Case Range("C5").Value > 0
Range("A1:M47").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$M$47"

Case Range("Q5").Value > 0
Range("A1:AA47").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$AA$47"

End Select
End Sub

It will select the print range if there is data in C5 but if there is data in C5 and Q5 it only selects the first print area. I know I need an "If - Else" or something of that nature but I cant figure that out. Also I need it to look at other worksheets not just the active one. I've tried a replacing the ActiveSheet with Worksheets (Sheet1). but that gives me an error.

View 9 Replies View Related

Set Print Area Through Code

Oct 24, 2008

I am having trouble setting print area on rows that can vary from 100 to 6000 rows. This code works good except that the print area cuts off the last row of data every time. "AreaBegin"=row 6 and "AreaEnd" = to last row after a set number of rows have been inserted based on a counter.

Basically how do I get this code to capture the last row for print area?

Sub SetArea()
ActiveSheet.PageSetup.PrintArea = Range("AreaBegin", Range("AreaEnd").End(xlUp)).Address

View 9 Replies View Related

Print Area VB Code

Jan 19, 2009

I wish the print area to be set based on the number entered into cell "D58". My code so far is:

Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim NumPages As Range
Set NumPages = Range("D48")
Worksheets("Sheet6").PageSetup.PrintArea = Worksheets("Sheet6").Range(0, 0).Resize(NumPages * 21, 47)
End Sub

View 9 Replies View Related

Return Area Code For State

Jul 20, 2007

I would be loading data into a spreadsheet, and when there is a phone number I'd like to have it populate the state field. (ex. (212) 123-1234 in the phone field, would populate "NY" in the state field, is this possible? If so is there any brief way to describe how to do so without taking too much of your time?

View 9 Replies View Related

Area Code Missing In Long Column

Oct 25, 2007

I have an excel sheet that I am importing to my network software. One of the columns lists telephone numbers, but they are as follows: aaa-bbbb

I need a way to enter an area code (the same area code) for all of the numbers in the column without manually entering them (the program I am importing this list to will not work without 9-digit telephone numbers).

View 2 Replies View Related

Keeping Area Code But Removing All Other Numbers

Jun 26, 2013

I'm trying to remove all the numbers of a phone number an keep the are code for 2000+ phone numbers.

ex. 111-222-9999

I want to remove the 2's and 9's but keep the 1's.

View 3 Replies View Related

Limit Scroll Area - Code Activates Only On Mouse Or Keyboard Input

Apr 21, 2007

I have a worksheet that serves as a navigation page for the workbook and use the following code to restrict from scrolling off the viewable content. The problem is that the code doesn't kick in until either a click if the mouse or keyboard input. This initially leaves the worksheet open for scrolling until input is received.

How do I make this code activate when the wb is loaded? Code in the Thisworkbook module already makes the menu the visible sheet, and code limiting the scroll area is in the sheet module.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveSheet
.ScrollArea = "A1:L11"
End With
Range("A1").Activate
End Sub

I've also tried using "Range("A1").Select", but it doesn't work either. How can I get this to work correctly?

View 2 Replies View Related

Print 2 Selected Area (highlighted Area)?

Apr 11, 2013

How can I print 2 selected area (highlighted area). I know there is a trick to do that. Right now I can only select (highlight) one area to print, but would like to know how to print 2 or more areas at same time

View 7 Replies View Related

Programmable Print Area: Macro To Set The Print Area According To The Amount Of Data In A Particular Range Of Cells

Feb 25, 2009

Using Excel 2003 I am trying to write a macro to set the print area according to the amount of data in a particular range of cells. I find I can include this instruction

View 2 Replies View Related

Take My Area Code List, And Make A State List.

Jul 28, 2009

Basically I have a giant list (50,000+) of area codes (like 312, 216, 517, etc...) and I would like to make a new column right next to that, which takes those area codes and transcribes them into states so it would be (IL, OH, MI, etc...)

I have a table on the 2nd page of my excel workbook which has every single area code listed in column A, and in column B it has all the state symbols. I got it from here: .....

View 9 Replies View Related

To Take My Area Code List, And Make A State List

Jul 28, 2009

Basically I have a giant list (50,000+) of area codes (like 312, 216, 517, etc...) and I would like to make a new column right next to that, which takes those area codes and transcribes them into states so it would be (IL, OH, MI, etc...)

I have a table on the 2nd page of my excel workbook which has every single area code listed in column A, and in column B it has all the state symbols. I got it from here: [url]

How would I go about making this new column on page 1 of my workbook which takes all the area codes I have and makes a brand new list of the states by looking up the area code/state table I have on page 2 of the workbook?

View 9 Replies View Related

Graph The Following Data In An Area Chart With Line Charts Superimposed On The Area Chart

Nov 1, 2006

I am trying to graph the following data in an area chart with line charts superimposed on the area chart. I have a lot of data (and a lot going on) so I'm trying to figure out the best way to show this in excel from a functional standpoing (i can't get this to work in excel!!) to also an asthetic standpoint (dont want it to look terrible or illegible). This is what I'm trying to chart:

1) Weather data (temperature) by region:
So one region, would be: Northwest
I would like the "area" (so a shaded region) to be the min/max of the temperature data for each month.

2) I would like to show the temperature for each year as a line graph on the chart - so you can see if a year falls in or out of the shaded region.

3) I would like to show a company's sales increases across the same months per year as separate line charts. I may choose to just show the biggest outlier year in the end... or to show 2006 (the latest data).

What I am trying to convery with the chart is that the company's sales is or is not tied to weather deviations. I have attached an excel file with the data. I haven't been able to use the area chart or get a two axis chart to work or get it to look even remotely professional.

View 3 Replies View Related

How To Set Fixed Print Area In Excel So Cells Within Print Area Can Still Be Modified

Feb 12, 2013

I have a workbook with multiple sheets that I need to print.

Is there a way to create a fixed print area within which you can mess around with formatting without extending or shrinking the print area?

I have tried adjusting the margins settings so that they are all the same, but this does nothing to keep a fixed print area.

View 1 Replies View Related

Vb Code To Set Print Area And Print Out

Aug 24, 2007

with creating vb code that will select certain rows in a spreadsheet, set the print area to those rows and print them out, and then reset the print area back to default.
The data is all on one sheet, but is split into 5 different areas, each below the next, with the column headers at the top of each.
e.g.

header_____header_____header
data_______data_______data
data_______data_______data
data_______data_______data

header_____header_____header
data_______data_______data
data_______data_______data
data_______data_______data

and so on. At the press of a button it'll set the print area to the first section and print (the section includes the headers as well as the data). Then at the press of another button it'll set the print area to the next section. There could be any amount of rows of data in each section so it needs to cope with that.

View 9 Replies View Related

Definable Scrolling

Nov 30, 2008

I've created a worksheet with split panes. I'm able to scroll through my data vertically and horizontally while keeping one area of th screen stationary. Here's my question:

Is there a way to limit the movement of my scroll bars so that it can't move beyond the viewable portion of my worksheet? In other words, I want the scrolling to end when there is nothing else to see but a field of empty cells.

View 11 Replies View Related

Scrolling Of Several Windows

Nov 6, 2007

way of getting two sheets to scroll together, so when I scroll one window the other one moves too? Some text editors have that future (IIRC UltraEdit does)

I can't find a scroll event in the windows code to trigger a macro to run itself.

I can get around it by using a selection change event which would restrict me to moving around with the cursor keys/Pageup/down, but I've got 15,000 to review regularly in a short space of time and it would be quicker by mouse

View 9 Replies View Related

Scrolling To Next Blank Row

Mar 18, 2008

[code/]Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'This macro scrolls the Report to TopLeft when you click
'anywhere in the Report columns

If Target.Column > 16 And Target.Column < 22 Then
With ActiveWindow
.ScrollRow = 1
.ScrollColumn = 15
End With
End If

If Target.Column >= 1 And Target.Column < 15 Then
With ActiveWindow
.ScrollRow = 1
.ScrollColumn = 1
End With

End If
End Sub[code/]

...but I cant figure out how to scroll it down the list to the NextBlankRow-20 such that the previous 20 lines of data are shown to the top of the screen.

View 9 Replies View Related

Scrolling :: Only The Used Range + 1

Jul 14, 2008

Is it possible to use a macro that do the following:

scrolling, only the used range + 1

So if the used range is B2:D12 then the scrolling is possible to row 13 and column E

View 9 Replies View Related

Scrolling To The Right - Skip Every Fifth Column?

Apr 26, 2014

I want to return the value of E2 from sheet, "ALL INFO" and paste it in B2 on my current sheet. When I scroll this formula to right, I want the next to be the value of J2 from sheet, "ALL INFO," etc.

View 2 Replies View Related

Fix Sum Cells To Always Be In View? Even When Scrolling

Feb 10, 2009

Ive seen on someone elses workbook the first 6 columns are fixed (always in view) then you can still scroll across but those first six columns always stay in view.

View 3 Replies View Related

Disabling Scrolling In 2007

Dec 18, 2009

I'm looking to disable the horizontal and vertical scrolling in 1 worksheet

Am i able to do this?

View 5 Replies View Related

Horizontal Scrolling Loop

Feb 2, 2014

I'm having a problem working with a protected document made by another user.

The sheet has a vertical split at column F, and when I use the arrow keys to scroll right beyond this line (ie from column G and beyond), when I reach the last column (BB), it just loops straight back to the beginning (column F). This also happens in the same direction.

How I can stop this happening, so that it just stops when it reaches the end of the document?

There doesn't appear to be any coding on the sheet.

View 1 Replies View Related

Scrolling Bar Within A Cell For Text

Jul 5, 2014

I have a spreadsheet where I want to put notes in, but I don't want to re-size the cell as it will ruin the format. The amount of information will vary from entry to entry, each entry into the sheet will have its own row and within that entry I want to dedicate one column's cell for that entry's notes. Is there anyway to make a macro for a scroll bar for individual cells so I can scroll though the text entered in that cell. I have tried a text box but the text overflows once the amount of text over fills the text box.

View 4 Replies View Related

Mousewheel-Scrolling In UserForm

Nov 17, 2009

i want to know whether there is any way to make an MouseWheel-Event in VBA (Excel 2003) and send it to the scrollBars of my UserForm?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved