Disabling The Control Drag And Fill Function

Mar 29, 2007

the function I'm referring to is when you have a value in a cell and you hover your mouse cursor over the edge and get the black cross with arrows on all corners. Once you drag the cell into another location, it copies the the data into the other cell.

I need a way to stop this from happening, because this causes reference errors on other sheets when users do this by accident. However, I still need to allow the user to be able to type in that cell, use the autofill option, and the Ctrl+C option. Is there a way to program a macro that can be put in the sheets to do this for specified cells or ranges?

View 5 Replies


ADVERTISEMENT

Drag From Treeview Control To Spreadsheet Control

Jan 12, 2007

I have created a userform within VBA which has a TreeView Control and a Spreadsheet control on it.

I have populated the TreeView control with data and what I want to be able to do is to drag the nodes off the TreeView control to the spreadsheet control.

I can drag onto a normal worksheet but not onto the spreadsheet control (the no drop mouse pointer keeps showing).

View 4 Replies View Related

Disabling Control Causes Crash

Jan 8, 2007

I'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.

View 4 Replies View Related

Drag & Fill Series Only In One Particular Sheet

Oct 18, 2008

I am not able to drag & fill series only in one particular sheet, in other sheets this function is working fine.

View 2 Replies View Related

Drag Fill To Follow Pattern And Skip Row

Mar 9, 2014

Attached is a sample worksheet. I have data in column A that I want to drag fill in column C. In column C, once the first 2 results in column A are entered, I would like a blank cell and so on.

testdv.xlsx

View 8 Replies View Related

Drag/Fill Formula & Skip Some Row References

Apr 28, 2008

I have the following formulae in seperate cells were A1, A2 and A3 are the cells

A1 =MAX(Data!C2:C3)
A2 =MAX(Data!C4:C5)
A3 =MAX(Data!C6:C7)

I would like to drag the cells so that automatically the cells below A3 are updated as follows

A4 =MAX(Data!C8:C9)
A5 =MAX(Data!C10:C11)
etc up to 600 rows

Unfortunately it is not being updated in that order. Do you have any suggestions how it can be done.

View 4 Replies View Related

Stop Date Cell Incrementing On Drag / Fill

Feb 8, 2008

I have a sheet where users enter a date and other details on each row.

The number of rows where data is entered can be upto 20 at any one time.

I wish to allow users to drag the cell date down for the number of rows they wish, without the date incrementing.

View 4 Replies View Related

Disable & Re-Enable Fill Handle & Drag-and-Drop

Jun 19, 2008

I've created a macro to disable cut-copy-paste and drag-and-drop (below), but when the user exits Excel, the drag-and-drop option remains turned off.

The user has to click on the Office button, go to Excel Options, Advanced tab, and re-enable the fill handle manually. How can I have my macro do this automatically when the workbook is closed?

'*** In a standard module ***
Option Explicit

Sub ToggleCutCopyAndPaste(Allow As Boolean)
'Activate/deactivate cut, copy, paste and pastespecial menu items
Call EnableMenuItem(21, Allow) ' cut
Call EnableMenuItem(19, Allow) ' copy
Call EnableMenuItem(22, Allow) ' paste
Call EnableMenuItem(755, Allow) ' pastespecial

'Activate/deactivate drag and drop ability
Application.CellDragAndDrop = Allow

'Activate/deactivate cut, copy, paste and pastespecial shortcut keys
With Application
Select Case Allow
Case Is = False ....................................

View 9 Replies View Related

Disabling Copy Function

Dec 23, 2008

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.

View 13 Replies View Related

Disable Paste Function (Including Drag And Drop) On Excel Worksheet

Jun 27, 2014

How can I disable the paste function on an Excel worksheet, including drag and drop?

Preferably I still want to retain the ability to copy.

View 1 Replies View Related

Fill ListView Control

Mar 13, 2008

I have added microsoft listiview control tool in the toolbox with the help of Additional control. By using listview control, i am going to view the details of employees. If i want to use this tool, i have to add listitem property. If someone know how to add listitem property in the library,

View 3 Replies View Related

Fill Forms Control ListBox

Jul 29, 2006

I created a list box from Forms toolbar (instead from VBE). I would like to add items to this list box using VBA, but cannot find right qualifier to access this object. When I tried to use " recording macro," the code that was generated was

ActiveSheet.Shapes("List Box 7")

but if I try something like

ActiveSheet.Shapes("List Box 7").addItem "hello"

it doesn't work, because well, addItem method belongs to ListBox object, not to Shape. So if I want to add an item to this list box, how should I reference this list box so that I can call addItem() on it?

View 6 Replies View Related

Formatting Control Box By Use Of Function?

Mar 4, 2013

So I've designed a data capture sheet that is full of control boxes including text boxes.

Following some googling I found this, it does exactly what I want (checks the date input to the box is a valid date and then formats it appropriately)

VB:
Private Sub TextBox7_LostFocus()
If IsDate(TextBox7.Text) Then
TextBox7.Text = Format(TextBox7.Text, "mm/dd/yyyy")

[Code].....

View 4 Replies View Related

Applying Function Arguments As A Control/class Name

Mar 16, 2007

I'm not sure what verbage to use in order to describe what I'm trying to accomplish.

Let me give you a piece of code and the question will be clear.

Function addValuesToComboBox(arg1)
arg1.AddItem("one")
arg1.AddItem("two")
arg1.AddItem("three")
End Function

I would like to use this function later in the code in the form of:

addValuesToComboBox("Combobox1")
addValuesToCombobox("Combobox2")

VBA will error out with "Run-time error '424': Object required". I know I need to declare the variable arg1 as a type in order to use it in this form, but I don't know the correct data type.

I also ran across a similar issue like this where the advice was to use the Set function in the form of:

Function addValuesToComboBox(arg1)
Set arg1 = arg1.AddItem("one")
Set arg1 = arg1.AddItem("two")
Set arg1 = arg1.AddItem("three")
End Function

View 9 Replies View Related

VBA Custom Function - Form Control Name Object Not Supported?

Jun 18, 2014

I'm creating a custom function to cut down on redundant code. However, in converting the code to a function so that it may be used in different instances, I'm getting an unexpected error when the code executes.

The error is:

Code:
Object doesn't support this property or method.

Here is my function:

Code:
Public Function chkClick(checkboxName As String, tabName As String, chartName As String, seriesNumber As Long)
Sheets(tabName).ChartObjects(chartName).Activate
If Sheets(tabName).checkboxName.Value = True Then
ActiveChart.FullSeriesCollection(seriesNumber).Select

[code]....

The function checks the status of the checkbox name passed to it. If it's checked, it will show a chart series. If it's not checked, it will hide the chart series. The error comes in referencing the "checkboxName".

How might I need to alter the code so that I can use the form control name as a variable? This is ultimately one of the key components of the function as each control has it's own name.

View 9 Replies View Related

Fill-down For The AVERAGE Function

Apr 25, 2009

I am trying to create a table showing the yearly average occupancy rates per quarter for every year between may 1998 and december 2008 inclusive (for licensed hotels, motels and guest houses, and serviced apartments in Australia; if that interests you).

I have a spreadsheet with a row of data showing the appropriate quarterly results for those dates. Let's say the data for this is displayed A1 through to A44.

For the yearly per quarter averages, let's say they are to go from B1 through to B11, I know I could put, for each year, an average formula with the relevant data range. Finding this to be tedious, I tried to fill-down.

I learnt the hard way however (not being too aware of how excel's grammar ticks) that the fill down function will not work for me. i.e., if B1 contained the average for the data range A1:A4 (the four quarters of 1998), the filled-in B2 would have the data range A2:A5 (i.e. the 2nd quarter of 1998 through to the 3rd quarter of 1999).

View 2 Replies View Related

Function To Fill In A Day Automatically

Jan 10, 2009

In the worksheet just say:Cell A1: Jan-11-2009 as today date. Cell A2: What is a date function I need to put in there so when a computer clock change to 12:01am it automatically fill in a next day it should be Jan-12-2009 and continues do so for the next day at A3 ....when computer clock change again. Remember I wanted a cells A2...A3...A2000 are blank until the computer clock change to 12:01am.

View 5 Replies View Related

Use Fill Handle On Function

Jan 26, 2007

I have a function =TimeSinceIns(3) in cell K3. Where the 3 represents the row number. I would like to fill the function all the way down to cell k100. And be able to do this reguarly. Unfortunately when I use the fill handle it leaves 3 as 3 when I want it to be changing to the appropriate row no. Ie in cell k4 would be =TimeSinceIns(4) and so on.

View 3 Replies View Related

How To Fill Table Using VLookup And / Or IF Function

Dec 27, 2012

Weight
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday

[Code]...

Monday Input Weight: 23
Monday Input number: 5

I'd like to autofill the above table from the "Input" numbers and weights I would enter elsewhere.

Previously, I would do that like this:

=IF(Y$10=0; ""; IF(Y14

View 6 Replies View Related

How To Fill In IF Function Across Columns Changing Column Ref Only

Jan 16, 2014

My formula in sheet "A" in cell D7 is this

=IF(Activity_Log!C2="BH",Activity_Log!F2,"").

What I would like to do with it is fill in row D7 to AH7 with this formula without changing the row reference in the IF function, only the column reference.

On the Activity_Log worksheet, my data is listed from cell C2:C32, which is selected from a drop down list, and F2:F32, which contains the formula =(E2-D2)*24.

I've attached a sample : Sample_MonthlyReport.xlsx

View 9 Replies View Related

Macro Fill Down Function Is Changing Format In Conditional Formatting

Dec 18, 2013

When I hit the macro code you see below I get both columns D and E, starting from row 18, to get 'filled down' to the specified spot. Every second row has a conditional format (when a value is entered in column A) to change the row to the color grey, and every row between it has a conditional format (when any value is entered in column A as well) to have the row changed to the color red. The issue here is that the Macro code messes up the conditional formatting and uses the conditional formatting of those two cells, which are being dragged down, for those entire filled-down columns! This is what I am starting off with test1.xlsm and this is what I end up with using the macro code below (or doing it manually)

test2.xlsm

Is there a way for the Macro code to bypass this issue?

View 6 Replies View Related

Disabling A COM Add-In

Feb 26, 2010

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".

View 9 Replies View Related

Disabling Alt+f11

Apr 12, 2007

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.

View 5 Replies View Related

Avoid Hard Coding Control Name Inside Control Event Procedure?

Mar 4, 2014

Is there any way in VBA to refer to a control in its own event procedure without referring to it by name/hard-coding?

It might be clearer to explain by a dummy code example:

[Code] ......

I'm seeking what I would need to replace Line1 with.

View 11 Replies View Related

Disabling 'mailto'

Oct 13, 2008

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?

View 5 Replies View Related

Disabling Functions

Jul 5, 2006

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

View 6 Replies View Related

Disabling The F9 Calculation Key

Mar 28, 2007

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.

View 2 Replies View Related

Select Next Control / Cell On Worksheet After Enter In Control

Jan 9, 2008

Within the ComboBox properties, is there anyway to control after "enter" his hit, you move to the right instead of down (similar to the edit under Tools/Options)?

View 9 Replies View Related

Disabling Auto Calculate For Others?

Jan 22, 2009

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?

View 8 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







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