Force Custom View On Restore Down Click
Apr 1, 2008
I need to create a macro that whenever the user clicks the restore down button it will not restore down, but either do nothing, or make the application display full screen. The following code runs when the workbook opens and whenever a different sheet is activated and I would like it to run when the user clicks the restore down button.
Private Sub Workbook_Open()
Application. ScreenUpdating = False
Application.DisplayFormulaBar = False
Application.ShowWindowsInTaskbar = False
Sheets("01").Select
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With............................
View 4 Replies
ADVERTISEMENT
Nov 29, 2007
I have a workbook with 3 spreadsheets. When I put ptotection on 2 of the sheets, the custom view will not work on the other. Any way to make the views work?
View 5 Replies
View Related
Sep 26, 2008
I am trying to set a custom view when exiting, but I keep getting runtime error 424 saying an object is required. I am attempting to unprotect the sheets, check the value of an option button, set the custom view based on that value, and then protect the sheets. Please keep in mind that the user may or may not be on the sheet containing the option button when exiting. Here is the code I am having trouble with.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call UnprotectSheets 'Unlock to set option button value
With Worksheets("Customer_Info")
If btnExistCust.Value = True Then
ActiveWorkbook.CustomViews("Sales_Exist").Show
Else
ActiveWorkbook.CustomViews("Sales_New").Show
End If
End With
Call ProtectSheets 'Call the sub before closing
End Sub
View 6 Replies
View Related
Nov 14, 2012
I have a large spreadsheet from which I need to create separate Reports by hiding various rows and columns. I have followed instructions for creating a couple of Custom Views (View tab, Custom Views, Add, Inserted Name, OK, Saved the document) but nothing happens apart from getting the message "Some view settings could not be applied". In fact none of the view settings were applied.
View 1 Replies
View Related
Apr 9, 2008
When I click the excel printing icon, I want a userform to pop up in which I make the choice for a certain customview that I build. This customview must then be printout. Note that I want to use the standard Excel print icon, not a custommade one in the worksheet. I figured out some code, but it doesn't work. For instance my if structure returns "false" even if I did click that commandbutton, see the code below.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Static PrintRequest As Boolean
formMyview.Show
If formMyview.CmdCancel= True Then
MsgBox "printrequest canceled"
Unload Me
cancel=True
Exit Sub
End If
If PrintRequest = True Then
Exit Sub
End If
If formMyview.CmdOk = True Then
For Each Myoption In frameViewoptions.Controls
If Myoption.Value = True Then..........................
View 6 Replies
View Related
Jun 15, 2008
I have a very wide sheet in which I have hidden and saved seven views.I am using it for a very long time but when i did some edit work in the 'full' view,the other views are not showing. In stead I am getting the messages "cannot shift objects off sheet" and "some view settings could not be applied".This is very frustrating since a lot of patience was tested while making this wide data.
View 2 Replies
View Related
May 4, 2007
I have an interesting question for everybody here. Let me see how to best explain it.
I start in the code making sure column Action Plan completion has a value in it. Copying in the issue modified column if neccesary.
'Back fill last modified
'I need to start with the first data row (3) and the action plan completion column
Let intcurrentrow = 3
Let intcurrentcol = intactionplancompletion
Do Until intcurrentrow > intmaxrow
If Cells(intcurrentrow, intcurrentcol).Value = "" Then
Let Cells(intcurrentrow, intcurrentcol).Value = Cells(intcurrentrow, intissuemodified).Value
'Need to ensure that everything is formatted as a date
Let Cells(intcurrentrow, intcurrentcol).NumberFormat = "m/d/yy h:mm AM/PM"
End If
Let intcurrentrow = intcurrentrow + 1
Loop
Later, I place this formula in a given cell.
=If(I9="Open-Remediated",M9-K9, If(I9="Closed-Remediated and Validated",M9-K9,"" ))
The info I copied above is placed into the column K.
When I run the macro, the cell formula outputs "#value".
However, if I go double-click then enter the cell calculates just fine.
I've tried excels overall recalculate function, but that doesn't change this.
Does anybody know how to simulate a double-click on a cell?
View 6 Replies
View Related
Dec 26, 2010
I made custom menu with these instructions: [URL]....
Problem is that when I right click my makro keeps copying itself. Ten times right click=ten my macro in the right click menu. It means that
Private Sub Workbook_Deactivate() doesn't work as it should be?
View 2 Replies
View Related
May 13, 2006
Have a spreadsheet wherein I have added some custom controls to the right-click function of the mouse. The buttons and their associated code runs great for all but one user in my office. For that user, the custom buttons do not even appear on his right-click menu. I have looked through his settings to make sure that his security settings are the same as everyone else that uses the spreadsheet, and they are. All of the other modules in the spreadsheet work fine.
Is there some other setting that would control the display of his right-click buttons. Perhaps a windows security setting that I am missing?
The following is a snippet of the code that adds one of the right-click buttons for example. This code is stored in the 'Workbook_SheetBeforeRightClick' event.
With Application. CommandBars(" cell").Controls _
.Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Caption = "Create Panel Hyperlink"
.OnAction = "CreateHyperlink"
.Tag = "brccm"
.FaceId = 2169
End With
View 3 Replies
View Related
Jul 24, 2006
I was just reading an answer to a question re: printing a set area.
Dave Hawley mentioned the best method would be to set a "Custom View".
how to "call" a custom view from a Userform dropdown?
I need to print several "reports" which are seperate parts of the same sheet.
View 7 Replies
View Related
Nov 28, 2007
I want to do is allow a user to choose entries from a data validation list and then they can remove the validation to make some edits to the selection. I have it set up so that they can do this by clicking on a command button that will remove validation for the selected cells.
What I want to now do is to be able to restore the validation in case they have made an error. My first thought was to have a hidden "Master" sheet that has all the relevant validation in it and then when the user picks a range to restore validation to, just copy the cells from the "Master" back to the working sheet (it should be noted that the range to restore validation to may contain cells with different validation). I'm sure the code for this is quite simple but I am still learning. The steps I want to do are:
1. Store the range of cells chosen on the worksheet
2. Go to the Master worksheet and select the same range
3. Copy the range from the Master worksheets back to the same range on the original worksheet.
View 2 Replies
View Related
Mar 26, 2007
i made XL App settings in a way suits my needs...........
Is there a code to restore these settings when i reinstall the XL App ?
View 3 Replies
View Related
Sep 28, 2013
If I erroneously saved over an excel document that is stored on an external drive, is there any way to restore the previous saved document, or am I screwed.
The thumb drive is plugged into a computer that gets backed up onto a network server, but I assume that the external thumb drive is not backed up with the c drive and r drive on the server.
View 3 Replies
View Related
Mar 19, 2014
I'm a beginner to VBA and I have a dataset with different loan rates for different schools. So far I can highlight rows based on their rate and order them from least to greatest.
What I want is to be able to restore all of the font to default (i.e. undo the highlighting) without changing the format of a specific column of cells (My G column, with the loan rates, goes from Percentage format to General format)
I'm using Selection.ClearFormats, which changes the format of the cells to general as well as it only restores the format of the cells I highlight, rather than the entire worksheet
So basically, how can I delete all formatting of all cells without changing the cell format (Percentage vs General)?
View 1 Replies
View Related
May 26, 2014
i accidentaly deleted excel file how can is recovery it
View 2 Replies
View Related
Jun 27, 2007
In a worksheet, I should have selected the region where data is present, and center align all the cells. Instead, I selected the entire worksheet and did the same, so that whenever new data comes in the relative cells are already formatted. This has caused the workbook size to increase dramatically. (So, I assume that changing a cell property from the default value uses some memory). Is there a way to restore the format of the blank cells to the default values, so that memory is freed and the workbook size decreases again?
View 3 Replies
View Related
Aug 13, 2007
I have a procedure that stores the Commandbar names and visibility settings in an array on open. Another procedure hides all Commandbars on open and restores their original visibility settings on close. For some reason the "Standard" and " Formatting" toolbars don't return to visible on close.
My error log says "08/13/07 18:21:37 [QA.xls]MCommandBars.bRemoveMenus(), Error -2147467259: Method 'Visible' of object 'CommandBar' failed". I have tried manually testing the hide/unhide procedure with hard coded settings and checked the correct variables are being sent and all seems to be correct.
I am pretty confident that the procedure to store settings is correct but have included the code just in case, also just noticed the "Standard" and "Formatting" toolbars are the only two visible at programme start.
Public gsaMenus() As String
Public Function bMenuSettings() As Boolean
Const sSOURCE As String = "bMenuSettings()"
Dim bReturn As Boolean
Dim iCounter As Integer
Dim cbrMenu As office.CommandBar
View 9 Replies
View Related
May 21, 2014
Any way to restore the default reference libraries that are checked the first time you open Tools => References in VBA in Excel 2013. I think I accidentally unclicked something that's necessary to run the program, and I can't find a "default restore" option or anything of that sort.
View 8 Replies
View Related
Feb 26, 2012
I want to disable the three buttons (minimize, restore and close) excel.
[URL]
View 14 Replies
View Related
Jun 11, 2014
I managed to implement a macro that adds a time/date stamp in Column A when any of the subsequent cells in that row are changed. With this now working, I really need the ability to restore the undo history in case a change to the data needs to be reverted.
Sub procedure:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
Application.EnableEvents = False
For Each c In Target
If c.Column > 1 And c.Column < 21 Then
Cells(c.Row, 1) = Now
End If
Next c
Application.EnableEvents = True
End Sub
View 2 Replies
View Related
Dec 12, 2013
Excel 2007 - need to adjust protected view settings but the protected view tab is missing from my Trust Centre settings - have the following tabs - trusted publisher / location, add-ins, activeX, macro, message bar, external content and privacy options. Document is a revenue authority download and without being able to adjust the protected view settings, can't input data.
View 3 Replies
View Related
Nov 7, 2007
I haven't used List Boxes much previously but decided to use one in this instance because I wanted the capability to make multiple selections. I used the following in a list box called "ListBox_Analysis_Code":
Private Sub ListBox_Analysis_Code_Change()
Dim iPtr As Integer
Dim sTemp As String
View 9 Replies
View Related
Feb 7, 2014
I wonder if it is possible to make a macro that right clicks a cell and then chooses a option from the list?
View 11 Replies
View Related
Feb 15, 2014
I'm trying to make a converter between about 8 various types of values. These are not units like Km or miles or something like that, but rather numbers that represent a specific "hardness value" on a variety of scales (to name a few: HRC, HRA, K)
What I've been doing so far is plotting the two types against eachother and then getting the best trendline I can so that I can use that formula to convert between the two with relative certainty. (for example, when plotting HV vs HRC my fourth order polynomial trendline with an Rsquared of 1 is y=0.0001x4 - 0.0188x3 + 1.0768x2 - 20.709x + 350.69)
My questions comes up where I was hoping to make a window or box of some sort allowing the user to input a numeric value, then selecting the Input units and the hopeful output calculated units, and have the box spit back to the user the conversion.
View 9 Replies
View Related
Sep 2, 2008
I want to be able to create a range of VBA userforms to quickly perform long tedious tasks. I want these userforms to be accessed from a nice tidy toolbar.
I have done this and it looks nice and works well. What I would like to be able to do is have my custom toolbar of userform controlled functions be transferable so that if someone else wants my toolbar and attached functions they can install it easily much the same way you can do with an add in.
Is this sort of thing possible or does it require them to manually install all my userforms, modules and toolbar? If it is possible what sort of things should I be looking at?
View 9 Replies
View Related
Oct 22, 2008
Running into this issue of "transworksheet macros"
I have a master "update" commandbutton on sheet 1. I have two sub "update" buttons on sheet 2 and 3 respectively.
What I would like to do is have the user click the master button, that would "click" the two sub buttons so they run their respective macros on their respective worksheets (within the same worksheet.
I have tried pasting the macro code in the master button, telling it to select the sub worksheet and then run the macro, but the marco runs itself on the master worksheet instead.
View 6 Replies
View Related
Aug 15, 2009
if there's a way to either define what columns or rows are printable or to somehow leave columns (or rows) as visible within the print area but omitted from printing as if they were hidden.
In my CAD package I can simply elect to have certain collections of information "non-printable", is there any way I can do this with columns without having to rely on people managing to laboriously (sic) hide and unhide columns either side of printing a document.
View 8 Replies
View Related
Feb 8, 2010
I've design a small little excell program that brings up a form and hides the excel workbook upon opening. By using the form the user is able to input data to a worksheet in running in the background. I've added a button on the form where I want the user to be able to open the worksheet which is password protected and view or print the data. I've already got the code to hide the workbook, protect and unprotect the sheets, I just can seem to get the code to view the one worksheet.
View 3 Replies
View Related
Sep 18, 2002
In keeping with their monopoly on code, Microsoft has, of course, locked all of the included XL add-ins (the code part).
I was interested in looking at how some of these add-ins functioned, seems like it could be fairly educational.
how to unlock the modules that come with XL's add-ins?
View 9 Replies
View Related
Feb 17, 2007
i was wondering how i can get excel to hide everything except for the worksheet, as soon as it starts and then put it all back when you quit.
View 2 Replies
View Related