Disabling Scrolling In 2007
Dec 18, 2009I'm looking to disable the horizontal and vertical scrolling in 1 worksheet
Am i able to do this?
I'm looking to disable the horizontal and vertical scrolling in 1 worksheet
Am i able to do this?
Is there a way using VBA that will allow me to disable a COM Add-in when I open a workbook without me (or the user) going through the steps to remove it first.
The reason for my asking is this: We have installed SAS Add-in 2.1 to Excel 2007. So this brings up SAS under the Add-Ins tab. But then when my program executes and it sees I use command bars, it adds my command bars under the SAS menu. I am trying to make the interface as clean as possible for the user, so they only see my command bars or menus.
Also, if we were to install the SAS Add-in 4.2 to Excel 2007, I have read in a SAS paper that SAS Add-in 4.2 creates its owe tab on the ribbon instead of inside the Add-in tab. So I would be able to use xml to make the SAS tab visible="false".
Is there a way to disable alt+f11
I will only disable it if the file is opened as read only
and I will enable it on before_close.
I am just using a simple sheet to keep track of email addresses. Every time I enter an email address it automatically creates it as a hyperlink/mailto function. So if I click on the cell, it will create a new email via outlook addressed to that person.
This is driving me nuts! I have a few thousand emails, mostly copied from other people's sheets, and 90% of them are set like this. Is there a fast way I can disable this function so that every cell is just text?
is there any way of disabling the following functions:
adjusting the size of the horizontal scroll bar;
being able to scroll to the right to search for tabs covered by the scroll bar
the reason being I want to have a few sheet tabs hidden but still be able to see the data on the sheet if a button taking you to the sheet is clicked
Private Sub cmdCalculate_Click()
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
End Sub
Is there a way to disable the F9 Calc key and get a user to hit this command button?
Right now this code does not work. I do have Calculation set to Manual so it is disabled in the worksheet.
Is there anyway in excel to make it so that you cannot copy the data off of the spreadsheet, but the user can still do functions, more specifically filters and such.
I've been asked to put it in PDF format, but my spreadsheet becomes useless without the use of filters. It's a check for the copyrights of my company.
I'm working on a workbook that has alot of calculations in it, on a pretty slow PC (Work-related), so auto-calculate is casuing crashing, so what I've done with this sheet is disabled auto-calculate and added a macro to calculate each sheet indiviually instead, which avoids the crashing (The last sheet still takes a minute and a half to process but thats ok I guess).
My worry is, when this workbook does the rounds, peoples excel will already have autocalculate on, and will crash it themselves. Is there anyway I can ensure that the sheet turns atuocalculate on or, failing that, does anyone have any ideas on how to help the issue?
I have a UserForm with lots of controls divided by multiple frames. (163 controls over 19 frames). The same UserForm will be collecting multiple sets of data but the first set is a "master" set. Anything entered in the master set will auto fill in subsequent sets.
What I need is a way of preventing the user from changing any options that were input in the master set in subsequent sets. ie, If I entered info into Frame1 of the master set it would show up the next time I opened the UserForm (I have this part), but I would not be able to interact with it (this is what I need).
Since I'm already pre-populating subsequent sets with the master info, my first thought is to loop through each frame testing for input and if so setting Enabled = False, but I'm not sure how to do the loop/test. Is there a way to set up a "For Each Frame in UserForm" statement? Also, the controls in each Frame could be TextBox, OptionButton, and/or CheckBox. (sometimes more than one type in the same Frame)
I have a userform with one combo box and one check box. Using the below script I am attempting to disable the check box as soon as a selection from the drop down option of the combobox is made. The combo box drop down menu starts with a blank. What I am finding is that even if the blank option is selected then this disables the checkbox prematurely. Ideally the checkbox should only disable if a non-blank option from the combo box drop down menu has been selected.
What I would like to have as end-result is that the blank option from the drop down menu in the combo box can also enable the check box again if a selection from the drop down menu has been chosen but then reverted again.
Code:
Private Sub ComboBox1_Change()
Select Case CheckBox1.Value
Case True: ComboBox1.Enabled = True
Case False: CheckBox1.Enabled = False
End Select
End Sub
I have a template sheet where the only thing the user need to do is fill in all the appropriate cells and the click the button that says SAVE to save the file to the right folder and file name.
I want to Grey out the ribbon completely so that user can even change the font or any thing else for that matter. The sheet and workbook is protected. Need a way to stop any unwanted tinkering.
I ran into a problem with one of my macros the other day. It processes several data files given to us each week. This week, one of the files had Auto-Filter enabled. I had to manually disable auto-filter, and re-run my macro.
I tried recording this action, but wasn't able to. Is there a way to disable/enable Auto-Filter with VB?
I have a workbook which adds command bar named "Upload Processing" to Excel application if you open it.
The weirdest thing is, it hasn't got any macro stored anywhere or at least I can't see it anywhere (Alt+F11).
Note: Don't forget to use application.commandbars("Upload Processing").delete command from VBEditor to get rid of this newly added command bar when you are trialing.
I have recorded a simple macro that refreshes a set of random data in my sheet everytime I click on the button I made.
When I see a zero in one of the cells I know to stop refreshing. The thing is, I click on the button quite rapidly and sometimes miss the zero. I need to click on this button quite quickly so slowing down isnt an option!
What I need is for excel to stop that button operation when it sees a zero in one of the cells.
How to disable by code Maximization of Workbook?
View 2 Replies View RelatedI'm working with Excel 2000 on Windows XP machines. I have the following
Private Sub soInputBox_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyReturn Then
PushScreenUpdateState False
clearAllData
loadAllData
Worksheets("Main Screen").Activate
PopScreenUpdateState
End If
End Sub
Private Sub loadAllData()
soInputBox.Enabled = False
End Sub
The idea is this: the user can either type the value into the text box (soInputBox) and then click a button, or type the value into the box and then hit enter. They will both do the same thing; set in motion all the functions that load a bunch of data, etc.The code for the event handler for hitting enter is shown above. Inside of the loadAllData function, I disable the text box. What seems to be happening is that after the soInputBox_KeyDown function exits, Excel crashes. If I comment out the line to disable the text box, Excel doesn't crash. My question is this: is this a known problem, and is there a known workaround? I would like it so that the text box is disabled so that the value that was input cannot be changed accidentally during the rest of the programs execution, so if there's a way to change the control to be unmodifiable instead of disabling it that would be a reasonable alternative.
I have 3 cpmmandbuttons in a spreadhseet named "Controls" . viz
Trim and Edit Base DataCreateReportArchive
They are always run in the same order.
My Aim is to disable and gray out the Archive button once its assigned macro is run(by clicking it) so that it activates only next time that the workbook is opened.
I noticed the arrow keys will move the active cell while I have an inputbox active. This will be an issue for my users, I need them to key in data only.
Is there a command that will disable the arrow keys while the users enter the requested data?
I need to find a way to do conditional formatting and disabling of a cell based on a value from another cell. For instance if A1=X,Y, or Z, then B1 will get grayed out and cell entry will be disabled. This is so that when skimming over the sheet, you can tell what cells in row B you need to put info in still, and if it's grayed you'll know you don't have to put anything there (and it won't let you).
View 14 Replies View RelatedFirst of I have a workbook, that runs several macros. All works fine. However I need to better secure the workbook. I realize that there is no guarantee on the security with excel but am hoping for something to solve the problem stated below.
When a user (with high security settings) opens the workbook in question, I would like the workbook to CLOSE out if the user chooses to disable macros when the asked by excel.
How do disable Private Sub Macro
I have a private sub macro for Sheet1 as shown below
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address "$B$2$" Then Sheets("Start").Select
Exit Sub
End Sub
And I have another macro (call ADDNumLine) that add additional data to the Sheet1. How do I temporally disable the Private Sub above when executing Macro AddNumLine?
How do I diable the "Delete Sheet" so user can not delete any sheets
View 9 Replies View RelatedI am using the following code to restrict what users are able to do with a Pivot Table I have designed:
Sub Workbook_Open()
Dim pf As PivotField
With ActiveSheet.PivotTables(1)
.EnableWizard = False
.EnableDrilldown = False
.EnableFieldList = False
.EnableFieldDialog = False
.PivotCache.EnableRefresh = False
For Each pf In .PivotFields
With pf
.DragToPage = False
.DragToRow = False
.DragToColumn = False
.DragToData = False
.DragToHide = False
End With
Next pf
End With
End Sub
However, I am getting a Run-time error with the 'For Each pf In .PivotFields' section after it has looped through all the Fields in my Pivot Table.
I am writing an XLA in XL2002 which will act on a number of legacy and new spreadsheets. During the execution of the XLA I set cell values.
i.e. m_rRange.Cells(j, i).Value = m_sInVal(j, matchIndex)
This then triggers the onChange event of the worksheet. Unfortunately, for one of the spreadsheets that this needs to work with, this causes an error. The error is trapped within the spreadsheet itself but the sub End is called which halts all VBA code execution.
My problem is that the XLA has not finished working and gets terminated early. I cannot capture this using an onError statement as it is never triggered (the spreadsheet code stops the execution and control never returns to the XLA).
I can disable the events using Application.EnableEvents but this means that none of the onChange events are called which is also not desirable.
So my question is: is there any way of disabling the termination of code using the End() statement, or of detecting when it happens to stop it?
I want to do disable certain ActiveX toggles depending on the value of a specific cell; this cell can contain more than one value that should disable that control. the logic works as follows:
IF Cell="A" THEN Toggle 1=Disabled AND Toggle 2=Disabled AND Toggle 3=Disabled AND Toggle 4=Disabled AND Toggle 5-Disabled
IF Cell="B" THEN Toggle 1=Ensabled AND Toggle 2=Enabled AND Toggle 3=Disabled AND Toggle 4=Disabled AND Toggle 5-Disabled
IF Cell="C" THEN Toggle 1=Enabled AND Toggle 2=Enabled AND Toggle 3=Enabled AND Toggle 4=Disabled AND Toggle 5-Disabled
IF Cell="D" OR Cell="E" THEN Toggle 1=Disabled AND Toggle 2=Enabled AND Toggle 3=Enabled AND Toggle 4=Enabled AND Toggle 5-Enabled
I have a workbook change event that when fired checks criteria to see that the sheet is complete. If not complete, the user must complete information on the sheet before continuing. The problem is that some of the "stuff" the user must do requires macros that fire and gain access to other sheets. Thus the "trap" I have set to restrict the user to just the one sheet has backfired on me restricting the user to just the one sheet. Is there a way that the workbook change event (or any other workbook event) be temporarily disabled until activated again?
View 2 Replies View RelatedI have a macro implemented in my worksheet which plots graphs. When you press it, it plots a graph.
What i would like it to also do is:
(a) create a tab name which states Graph_1.45 {last bit is whatever the name of the data worksheet is}. - so for example i will eventually have 20 worksheets of data of the same form as the attachment. Each will have the option of the graph. So each will haveits own name, by pressing the graph button the name thatis given is Graph_"whatever the tab sheet of data's name is".
(b) Now the problem is if a user forgets to delete the worksheet it comes up with an error. Is there a way by which if the graph already exists the macro comes up with a message "Graph already exists" and gives an option to delete that graph and plot nbew one?
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.
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
[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.