Zoom And Freeze Pane Not Working With (With) Statement

Aug 9, 2012

In the below code I am trying to Freeze the panes on "B3" and Zoom out of the page to 90%. I keep getting errors on these two lines and I believe I am not coding these lines properly. (Errors are occurring in the "With" statement with all the PasteSpecials)

Code:

Sub Export()
Dim LastRow As Long
Dim TabString1 As Variant
Dim TabString2 As Variant
Set NewBook = Workbooks.Add'    With NewBook'     

[Code] ...........

View 8 Replies


ADVERTISEMENT

Split Screen And Freeze Pane

Nov 18, 2012

I have a chart with data displayed in columns A thru F and chart to the right of data. Chart width is adjusted programmatically based on amount of data from the user input.

I have been able to split screen and freeze panes so I can horizontally scroll through chart without moving data. Is there a way to be able to scroll vertically through data and have chart frozen?

View 1 Replies View Related

Freeze Pane In Non-active Sheet?

Jul 3, 2014

I want to freeze pane in sheet 2 without need to activate it since sheet 1 is active sheet. all the code that i found using ActiveWindow like code in below. is there any way to freeze pane without activate it?

[Code]....

View 1 Replies View Related

Hide Freeze Pane Guideline

Jan 5, 2007

When using the freeze panes excel places a guidline that appears at the top of the scrollbar but this can spoil the presentation.

View 3 Replies View Related

Apply Freeze Pane To All 31 Sheets Simultaneously?

Feb 22, 2014

I have 31 identical spreadsheets in one workbook. Is there a way to apply Freeze Pane to all 31 sheets simultaneously?

View 4 Replies View Related

Loop Through Sheets And Fetch Freeze Pane Positions

Nov 22, 2013

I need to list all freeze pane position from every sheets in my workbook in order to reverse a "unfreeze all" function. I don't know if i need to be more specific ?

Situation : I have a workbook with many sheets. Every worksheet has a different freeze pane position. I hate freeze panes, so while i'm working in a workbook, i remove them all. My boss likes those ones so i want to give him back my work with the same layout.

The main thing i don't know here if how you ask Excel to fetch freeze pane info. Ideally the information will be reported in a new sheet, columns : Sheets, HorizontalFreezePanePosition, VerticalFPP...

Once i will have this list, i will create a new macro and set back freeze pane individually.

View 2 Replies View Related

Cell Pointer To Go To Cell Where Freeze Pane Starts

Mar 10, 2003

I am working on an excel macro and need to know what the vb code is to get my cell pointer to move to the top left (ctrl-home) of a frozen pane. I don't want my cell pointer to go to a1. I want the cell pointer to go to the cell where the "freeze pane" starts.

View 3 Replies View Related

Freeze Panes Code Not Working.

Oct 27, 2009

Freeze Panes Code not working.
Below is the code im not sure whats up with it?

View 3 Replies View Related

Zoom In By Using The ActiveWindow.Zoom Control

Nov 28, 2008

I know you can predefine the level of zoom you want by using the ActiveWindow.Zoom control. I'm trying to find some code to Zoom in by a particular percentage. For example +10% zoom, so if you are currently on 90%, excel zooms to 100%, click again and then get a zoom of 110%.

View 3 Replies View Related

Freeze Panes Via VBA Selects Wrong Freeze Point

Jun 1, 2012

I have a macro which I recorded, then modified. The first thing it does is to freeze the top row, then it goes looking for a particular row and inserts some formulae. Nothing complicated at all.

It WAS working perfectly, but I wanted some improvements in the insertion of the formulae. I got that working just fine, but now the panes freeze in the wrong place. No matter what I do, it freezes at cell I16. I want only the top row frozen.

Found this code which was reported to work:

PHP Code:

    ActiveWindow.FreezePanes = False    Range("A1").Select    ActiveWindow.FreezePanes = True 

It still freezes at I16. I have tried shutting down Excel, and even my computer, in case it is some weird bug where something is stuck in memory.

I tried recording another macro to format some cells and also freeze the top row. Same result.

PHP Code:

Sub wraptext_top_row()'' wraptext_top_row Macro''    
Rows("1:1").Select    With Selection        
.HorizontalAlignment = xlCenter        

[Code] ..........

Same result. I tried copying the contents of the worksheet to Notepad, then into a fresh workbook, just in case there's some weird hangup in formatting that I can't see.

There is NOTHING in the original code that references that cell, or even that row or column. NOTHING. How it got hung up on that one cell I cannot fathom.

The Freeze Panes command works normally if I apply it manually. Any cell, anywhere, it works as expected.

View 1 Replies View Related

AND Statement Not Working

Nov 5, 2009

Cells H5:S5 have a formula in it to determine whether or not the allocation calculation needs to be made. I figured it to be straight forward enough

View 3 Replies View Related

IF Statement Not Working

Sep 30, 2009

The statement below was working perfectly until I added the last argument highlighted in red. Also, the statement in red works as expected when used sepeartely. It doesn’t work when combined with all the other proceeding IF statements.

Additionally, all the values that I’m testing with my IF statements are being populated using vlookups. Again, the statement works fine but I just can’t put the last statment (in red) with all the others and get it to work.

View 9 Replies View Related

If And Goto Statement Not Working.

Dec 3, 2008

I have this bit of code and I am curious why when the activecell is J29 it will not goto line 20 it just keeps running to the next line?

View 4 Replies View Related

IF Statement Not Working As Expected..?

Jul 30, 2009

I have two worksheets named "Data" and "Product". I want to use the following macro to sort the records depending which sheet is active. If I am in the "Data" sheet, it does the sort in the "Product" sheet? I was expecting it to ignore the second IF statement when I am in the "Data" sheet?

View 3 Replies View Related

Case Statement Not Working

Oct 26, 2009

I wrote this short program that parses out last name and zip code from one cell into two cells so I can map the sales data. I flagged each sale as either member, non-member, or neither, based on the prices of the items (members get 25% off). I used the case statement below.

the problem is that for one of the sale items it's getting flagged as "neither" despite being at the members price level. it works for that same item in other records. the quantity at error point is 3 for two of the errors and 6 for the third, but the strange thing is it works for a few other sale records in which the person also bought 3 of that item (the quantity is not the culprit, or sole culprit).

Here's the code. Obviously Price and Quant are the two variables involved. I declared Price as a double and Quant as an integer, even though both have two decimal places in the data file. That way the product of Quant and each items price for one and Price will both have only two decimal places even though it was rounding off that product to two decimal points without declaring either variable. I cut out some of the case statement so as not to exceed the character limit.

View 4 Replies View Related

If Statement With Three Criteria Not Working

Jan 24, 2014

How should my multiple If And Or statement syntax read?

On first button click If "BUY" or "SELL" is in column 83 then copy as the code indicates to sheet "Orders" as the code indicates. This it does.

On second button click don't copy the same "BUY" or "SELL" that has already been copied to sheet "Orders".

So the Countif should set J to greater than 1 for the previous copies and be ignored and only copy from sheet "Main" the new "BUY" and "SELL" that show up.

I'm getting double and triple copies of items already copied that should set J to > 1.

Code:
Option Explicit
Sub BuyCells()
Dim c As Range

[Code].....

View 9 Replies View Related

Conditional VBA Delete Statement Not Working?

Jan 10, 2013

I have the macro below that I want to use to conditionally delete all columns where the first row of each column does NOT have the following values but it seems to be deleting most of these columns as well all the others.

Fellow Excellor
Sub Deletecolums_Conditional()
Application.ScreenUpdating = False

[Code]....

View 3 Replies View Related

Multiple Countif Statement Not Working?

Jan 22, 2013

creating a multiple if statement. I have 3 columns in Sheet 1 called "Raw Data". Column A is dates, Column B is Clients and Column C is Products. I want to count the number of products sold to a specific client on a specific date. In Column A, the are multiple dates repeated as there are different sales reps so i have the dates repeated several time.

the current formula i am using is:

=COUNTIFS('Raw Data'!$A:$A="2013/01/01",'Raw Data'!$B:$B,="MotorCity",'Raw Data'!$C:$C,="Cars")

the problem is that i keep getting 0 as a value. If i remove the Date as a variable, the formula works. I just cant seem to count multiple criterias if the date is one of them.

View 6 Replies View Related

Find Statement Not Working Properly

Apr 2, 2007

I am in the process of converting my programs over so as not to use these and I am already seeing a drastic difference in speed.

I have run into a problem that I need help with. I have a spreadsheet similar to the example below. The first column contains a list of college majors and after each major is a row of classes that are required by that major.

A25346 ENG101 MAT115 PSY150
A35678 ENG111 MAT115 SOC101
A23456 ENG101 MAT116 HIS201

The first thing I need to do is search down the first column for the major. Once the major is found I need to search across the row for the class. I am having trouble searching across a single row for the class.

Here is the section of code where I experience the problem

Set rMajor = wsMajor.Cells.Find(What:=Major, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False)

If Not rMajor Is Nothing Then
majorrow = rMajor.Cells.Offset(0, 1).Value............

View 9 Replies View Related

Freezing A Pane On The Top AND The Bottom

Feb 13, 2009

I would like to have the column titles stay so I have frozen row 1. But I would also like to freeze row 200 so I can keep up with the running totals at the bottom of the form as I fill in information. Is it possible to freeze a pain at the top and the bottom?

View 4 Replies View Related

Unable To Get The Task Pane To Display On Startup

Oct 9, 2008

I am working in Excel 2003 and have recently lost the Task Pane when I start Excel. The box in Tools Options to display the task pane is checked. I have modified the registry to include a DoNotDismissFileNewTaskPane value and have even added the following code to the Personal.xls file:

Private Sub Workbook_Open()

On Error Resume Next
Application.CommandBars("Task Pane").Visible = True

End Sub

If I remove the On Error Resume Next line I get the following error:

Runtime error '-2147467259 (80004005)' Method 'Visible' of object 'commandBar' failed

I did add the Analysis Toolpak last week but am not sure that this had anything to do with it.

I can go into the View menu and show the Task Pane and do have the CTRL+F1 option to display it.

View 9 Replies View Related

Disable Alt-click Opening Research Pane

Nov 11, 2006

Simple question: How can I disable the Research Task Pane from launching when I Alt-click in Excel 2003?

Further Explanation:
I have an Excel Add-in (commercial, not my own) that will retrieve data from an outside server when the user presses Alt-Double Click. Work's great. I've now upgraded to Excel 2003, so anytime I Alt-Double Click, Excel opens up the "Research Task Pane" (Pain?). To make matters worse, I'm behind a corporate firewall, so I get an authentication challange in order to connect to the internet when this opens. Don't want it, don't need it, want to get rid of it. Any solution is fine - Option setting, VBA, Registry setting

View 2 Replies View Related

Custom Zoom Set At 90

Dec 23, 2008

If I send a workbook out with the zoom set at 90...will the zoom be at 90 when others open it.? Also, is there a worksheet event that I could insert to force a specific worksheet to always open with the zoom at 90??

View 2 Replies View Related

Defualt Zoom

Jul 31, 2008

Im using Excel 2007

How do i change the default zoom that excel views documents? Whatever view the last person saved the file as it opens in that zoom. I want it to open 75% zoom no matter what anyone saved the files as.

View 9 Replies View Related

Copy Zoom To New Sheet

Jan 22, 2009

I have a sub that copies worksheet to a different blank sheet in a different work book. Is there a way for me to set the zoom value on the 2nd sheet (the one being copied to) the same as the 1st sheet?

View 3 Replies View Related

Screen Zoom For A Workbook

Jan 24, 2013

I have just run into the situation where some users, magically and overnight , have widescreen monitors. This means the screen designs for 4:3 monitors show way too much on 16:9 monitors. I would like to put a control button on the opening page that gives them a choice of zoom, which usually seems to be 100% and 135%.

I'm thinking probably an IF sequence to parse their response and execute the appropriate zoom. But how can I make it effective for all the sheets in a workbook?

View 9 Replies View Related

How To Zoom Sheet Particular To 80% Using VBA On Closing

Mar 21, 2013

When user close the file, I want to make sure certain sheets can zoom to 80%. How can this be done using VBA?

View 1 Replies View Related

Zoom To 120 When Any Workbook Is Opened?

May 13, 2014

I am looking for a way to have Excel zoom to 120% whenever any workbook is opened. (My boss has poor eye sight...)

I set up a simple Macro

Code:
Sub Auto_Open()
ActiveWindow.Zoom = 120
End Sub

but I get an error that says "Run-time error '91': Object Variable or With block variable not set.

View 1 Replies View Related

Code To Open WS In 70% Zoom

Nov 16, 2006

I could need a code (WS code I assume) that open the sheet in 70% zoom every time I open that sheet. For now I get in 75% every time I open it. I guess that WS code will bypass that default setting, or bug, or what ever resets it 75%.

View 9 Replies View Related

Center On Zoom In A Frame

Jul 15, 2006

I am developing a form for emergency dispatching. One of the features of this dispatch sheet is that there are several maps in it that open on a seperate form. The map form has 4 maps that are picture files in an image. these images are in a frame. The different images are selected using option buttons. Given the background above, my problem is this. I have code that zooms in 50% each time the Click event for the image is fired. wht i am trying to do is make the zoomed view center where i clicked. this is the code that i have so far but it doesn't work all that spectacular, the closer I zoom in the further out of center the place i clicked gets untill it is out of view.

Private Sub Layout_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CurrentX = X
CurrentY = Y
End Sub

Private Sub PlantLayout_Click()
If Frame1.Zoom < 400 Then Frame1.Zoom = Frame1.Zoom + 50
frmmap.Frame1.ScrollLeft = CurrentX - (Frame1.Width / 2)
frmmap.Frame1.ScrollTop = CurrentY - (Frame1.Height / 2)
frmmap.Repaint
End Sub

View 2 Replies View Related







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