I have a situation which I hope is fixable. I have frozen panes above and to the left of cell F5, therefore all columns to the right of column E scroll left and right and all rows below row 4 scroll up and down as required. My problem is that I also need the whole top row to remain static all the time.
I have a userform that has two comboboxs on it. When the user clicks and selects an item in combobox 1 the code will highlight an area of cells that I set before. When the user clicks and selects an item in the combobox2 I need a piece of code that will highlight a second area of cells while still keeping the first areas of cells highlighted.
How I have it set up now if the combobox1.text = "Monday" then the cells B6:H20 are selected. But when the combox2 click event fires and selects another range of cells the first range selected by the combobox1 event is unselected. Is there a way to keep both areas selected?
I have a worksheet (Data Lookup) that initially I just required row 1 to be frozen. Now my worksheet would be much easier to read if I was able to freeze row 115 and row 263 when they reached the top of the sheet respectively.
e.g. Row 1 frozen, when I scroll down the sheet and row 115 hits row 1 that would also be frozen and the same with row 263 when it comes into contact with row 115.
I have looked around and cant find a solution and to be honest I'm not sure if it is even possible.
In making my label printer, I will need to set the print area for multiple sheets based on a range generated in a cell. E.g. Sheet1 might need cells A1:P1200 set as print area, Sheet2 might need cells A1:G694 set as the print area, Sheet3 might not need to be printed, etc..
I have no problem generating a formula to state what the print area for each sheet should be, respectively, but passing that info into VBA has me really stumped. (Using indirect in the Page Setup menu doesn't work after the value has changed, it changes the value to a static reference, which is bizarre). I suspect I'd want to use the Sub Workbook_BeforePrint, but I'm not 100% on that. I will generally have 3 or more specific sheets selected using a button-triggered macro that gets a cell value of sheet names and selects those sheets.
My code is below. See how I have repeated the same code over and over for each row. Is there a shorter way to write this, perhaps a cleaner way. Im not an expert and I write what I know and most of that is long code that can be shortened.
In my userform I have a list of check box's that can be selected. Currently if more than one is selected, they will appear in the spread sheet in the same line one after another with a space between them. How do I make it so they either appear with a comma appearing after each, so the next value appears on the next line below or most perferably the cell turning to a drop down list with the values?
VB: If CheckBox1.Value = True Then ws.Cells(iRow, 2).Value = ws.Cells(iRow, 2).Value & " " & CheckBox1.Caption If CheckBox2.Value = True Then ws.Cells(iRow, 2).Value = ws.Cells(iRow, 2).Value & " " & CheckBox2.Caption If CheckBox3.Value = True Then ws.Cells(iRow, 2).Value = ws.Cells(iRow, 2).Value & " " & CheckBox3.Caption If CheckBox4.Value = True Then ws.Cells(iRow, 2).Value = ws.Cells(iRow, 2).Value & " " & CheckBox4.Caption If CheckBox5.Value = True Then ws.Cells(iRow, 2).Value = ws.Cells(iRow, 2).Value & " " & CheckBox5.Caption If CheckBox6.Value = True Then ws.Cells(iRow, 2).Value = ws.Cells(iRow, 2).Value & " " & CheckBox6.Caption
Spreadsheet current cell appearence if all 6 are selected ' Chinnook EH101 Lynx Puma Sea King Fixed Wing'
Required appearence: Chinnook EH101 Lynx Puma Sea King Fixed Wing
I'm trying to get one of my macros to freeze panes in several worksheets. For some reason though, sometimes it freezes the panes in the wrong place. What could be causing this? My code basically looks like this:
I am looking to freeze row 18 in an excel sheet, however in doing so this really limits the amount of rows below row 18 that can be viewed and scrolled through.
I would like to know if there is any way that you could freeze row 18 and when you scroll down on the worksheet, you can scroll down past rows 1-17 and when row 18 reaches the top row it would lock there? And you would then be able to continue scrolling down the worksheet beyond row 18..
I am having problems with the VBA Editor freezing at the most inconvenient of times when writing code and then clicking to the Sheet I'm working on, it just freezes up the whole of Excel and it has to be shut down and opened up again.
It seems like a memory problem at first, but there is sufficient memory ( 768Mgs, OS is XP Pro, Excel 2000, 9.02).
The work is not lost becuase I'm able to Save even at PC Re-boot, fortunately.
I've tested on 2 different PC's and the same happens. The only way to avoid the freeze it seems, is before I switch to view a worksheet, is to Save then click off VBA Editor and re-open. When doing so, another symptom is it seems a huge amount of memory is freed up, ( pardon the terminology)
There is also a message that pops up when re-opening that same workbook that there are Formulas Linked to another workbook, but unable to find any after tediously searching every worksheet by using "Find, Look in Formula" there is nothing found, yet.
This freezing may happen twice a minute whilst pointing the mouse cursor from any VBA Edit window or worksheet and it's getting to a point of repetitiously having to Save, click off VBA Editor, and Click back on again each time I need to look at a respective Worksheet.
Is there a way to freeze specific panes? I know that you can use freeze panes to freeze cells to the left and above a specified cell but I am trying to freeze specific cells. For instance I want to freeze cells A1 through K25 so that when I scroll up everything else scrolls up and when I scroll right everything else scrolls right?
I'm looking for a solution to freeze panes twice. That is I want to freeze row 1-15 and row 200-203. And then the rows 16-199 to be movable. In the first 15 rows I have column info so I need that visable all the time and in row 200-203 I have " Sum" of the lines 16-199 so that's why I want that to also be visible at all time. The ordinary freeze pane in excel just freezes at one certain horizontol point and I need 2. Can it be done with VBA maybe? Is it possible to insert an up/down arrow (the one you have at the right side of the screen, don't now what it's called) for the lines 16-199?
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?
I need is for a block of cells (A1:I4) to be visible at all times. I've frozen the sheet so that the top four rows are always visible, but unfortunately the sheet is quite large, horizontally-speaking, so that when users scroll horizontally, important stuff scrolls off the screen.
I have a table that is frozen in b5 meaning that the first column ("A") and rows 1-4 are frozen. The table is large with ever expanding rows. What I want to do is, a good few rows down (say row 300), freeze the row at the bottom of my view and use that row as a mean average row. Therefore allowing me to enter much more data above, but constantly be able to see the averages of the data I am adding.
I am using Row 3 as a my template to insert a row for every new line of data i enter. I have a macro that copies the format and formula on this template row to insert at the end every time. The problem is on ROW 3 Cell F i am using a Today() function and everytime i insert a row the date is populated. But the next day the date automatically update. In my search on this forum, i found this macro to supposedly lock in the dates, but i doesn't work.
VBA: Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Not Intersect(Range("F2:F10000"), Target) Is Nothing Then storage = Target.Value Target.Value = Format(storage, "dd/mm/yy") End If Application.EnableEvents = True End Sub
How can I freeze a sheet's tab location so it doesn't roll off of the screen? I have a workbook with 30 worksheets all hyperlinked off of the 1st sheet which is the INDEX sheet. The INDEX sheet only exists to make it easier for users to go directly to their desired sheet without tabbing horizontally through many sheet names. However when users use the bottom left arrow buttons to tab through the worksheets, the leftmost INDEX worksheet tab scrolls off of their screen. I realize that they can right click on the left/right tabbing arrows to see a list of all worksheet names, but it would be nice if the INDEX worksheet tab never rolled off of the horizontal tab scroll bar.
I have a progress bar on a form......it is there for no reason other than for me to practise such things...the code came off these forums and the bar is powered by a random number...
now my problem is the moment it start running i cannot do anything on the form....i would like my bar to do it's thing but still be able to click on the cancel button to get out of the form any help on this would be fantastic
Private Sub UserForm_Activate() Dim dTime As Date Dim i As Integer
Do Until i = 100 For i = 1 To 100 Step 100 / 8 dTime = Now + TimeValue("0:00:01") Application.Wait TimeValue(dTime) ' ProgressBar1.Value = RandNumGen(1, 98, 1) 'AboutScreen.Repaint Next i 'AboutScreen.Repaint Loop
Basically I need the macro to select clusters of zeros in each of the columns with a label of 10 characters (this is an arbitrary number I chose when writing the macro), and if the values of the cells immediately above and below the cluster are the same, change the value of the zeros to the value of those cells, otherwise, the value of the custers remain as zero. So far I have the following code.
I'm trying to lock the cells of my work book both vertically and horizonatlly. There are "header criteria" on both colums and rows that I want to lock so when you scroll down or over the title bars stay. When I've done it in the past it won't let me lock both correctly.
I have a sheet in which I am using freeze panes to keep the header section always visible. I would like to be able to add a toggle button with a macro to the sheet to allow the user to turn the existing freeze panes on/off at will, without the need to navigate the menu bar itself. So far I have not been able to find any info on if/how this may be possible. If anyone has any experience controlling freeze panes via macros, etc.
If is possible to create any info about freezing panes. I mean, when is pan freezed, and rows are scrolled in lower part of table (upper data are not vissible) if is possible display/show any text about this (e.g. "The first line of table are not visible")...but only if is not the upper part of data visible..not always.
I know you can't delete columns permanently in a worksheet so I am hiding them. Attached is an image of how many I want. My issue is that the dividing line that is used to freeze a top row pane is still extending across the entire worksheet (which has whitespace on the right side).
I suppose I could always extend my formatted worksheet to be the size of the screen.