RefEdit Control To Click On The Desired Range

Jul 8, 2009

I am using a refEdit control on a userform to get a range from the user (they use the refEdit control to click on the desired range). My problem is that the user typically has 3 or 4 different workbooks open and if one of them is maximized withing Excel, the user is unable to get to them to select the range (only the maximized workbook is displayed and usable). Is there a way around this?

View 4 Replies


ADVERTISEMENT

Get Range Specified In Refedit Control

Sep 7, 2007

I have built a user form that amongst it's other functions displays the results from three cells on one worksheet.

The values in these cells need to be pasted in three cells on a different worksheet (cells are selected by user using a "RefEdit" field on the form.

The VBA help files offer a single example of the paste special method (I've proven I can paste to the celss but of course that pastes the formula rather than the value!) that shows it operating on a single worksheet as follows:

With Worksheets("Sheet1")
.Range("C1:C5").Copy
.Range("D1:D5").PasteSpecial _
Operation:=xlPasteSpecialOperationAdd
End With

So, simple question...

How can I use the Paste Special method to paste the values of the cells in cells specified by the user?

View 5 Replies View Related

Set Range Variable To RefEdit Control

Dec 3, 2007

I'm trying to set up a userform with a refEdit box that allows the user to select a cell range. I then need to assign that cell range to a range variable so the macro can use it. I'm having a problem reconciling the assigned string variable that refEdit returns and the range variable that I need.

So what I'm trying to say is that I can assign the range fine through the Userform, and I can see through the debugging screen that mySampleVariable (dim as a variant) holds a range value of 'Access Dump'!$A$8 (the correct range), but when I try to

Dim myRange As Range
Set myRange = mySampleVariable

The code bugs out because it apparently can't assign a string value to a range variable.

View 4 Replies View Related

Refedit Control In Worksheet

Jan 23, 2007

I would like to use the RefEdit control in a worksheet in order to select a range of cells and pass its address to a different cell without code.

I thought of using the LinkedCell property of the RefEdit as I used it for a ComboBox.

View 9 Replies View Related

To Set Focus To The RefEdit Control In Userform

Feb 23, 2007

I am trying to implement a simple userform using the RefEdit control.

So I have the RefEdit control and an Ok (which has code attached to it) and a Cancel commandbutton.

For some reason, I can't get the focus on the RefEdit control (i.e. when I activate the form, I have to actually click in the RefEdit box before it gets the cursor). Which property sets the focus in this control?

Right now I have the Ok button Default property set to True.

I have a commandbutton on the spreadsheet that activates the userform.

View 9 Replies View Related

Refedit Control Failing In 2007

May 24, 2007

I'm finding that my add-ins that worked perfectly on Excel 2003 are not functioning on Excel 2007. One of the main issues seems to be loading any UserForms that use the RefEdit control. I get a message saying:

--------------------------------------------------
Run-time error '459':

Object or class does not support the set of events
--------------------------------------------------

View 5 Replies View Related

RefEdit To Capture Range For Other WB

Oct 27, 2008

I have a userform with a 3 refedit controls. Each needs to capture a range from a different workbook (already open - only not active).

Is it possible to configure the refedit to capture a range from another workbook (either thru window menu or ALT+TAB)?

I notice that InputBox type:=8 allows it - I'm a little suprised that default refedit doesn't.

View 9 Replies View Related

Use Part Value Of A Range In Userform Refedit

Feb 27, 2013

I have a refedit box in a userform wherin i will be selecting a range and thus getting a value say "$A$1:$A$2"

Now what i need is that it should seperate the value as follows so that they can be used in another place

starting column to a variable x.
starting row to a variable y

similarly
ending column to a variable p
ending row to variable q

Looking for code that if i select more than 1 column in the refedit it should tell me to select a single column and not more.

View 2 Replies View Related

Calendar Control On Click

Apr 21, 2008

I want to be able to show a calendar control, have the user select a date, and then fill a cell with that date. The range I would want the calendar to appear is B2:B100.

View 9 Replies View Related

Running On Second Click Of Control Button

Aug 16, 2007

Is there a way to force a control botton linked to some VBA code to run the macro on not the first, but the second click?

View 9 Replies View Related

ActiveX Click Control--STOPS When On Another Sheet

Nov 23, 2007

RE: Macro ActiveX Click Control--It stops when on another sheet

Macro runs OK when run from menu.

An activeX click button was put on sheet B.

Right click the control, View Code, Paste in code from macro, then click button.

It runs the part of the macro that applies to sheet B, goes to previous sheet A, and then stops. The range select line for the named range on sheet A is highlighted in yellow. It stops when selecting any range or cell on sheet A, like B2.

Any idea why this code does not work on sheet A when ActiveX button is on sheet B? Is there someplace else that the control can go? Using Excel 2000.

See part of code below, which starts on sheet B:

' Macro recorded 11/22/2007

Range("SortAll").Select
Selection.Sort Key1:=Range("T2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
ActiveSheet.Previous.Select
Range("FormBase").Select (STOPS HERE)
Selection.Copy
Range("Formul").Select
ActiveSheet.Paste
ActiveSheet.Next.Select
FormBase is a named dynamic range
FormBase=OFFSET(A!$A$2,0,0,1,MATCH(1E+306,A!$2:$2))

View 9 Replies View Related

Look Up A Value In A Range Of Cells And Then Return A Value In A Cell In The Same Row Containing The Desired Value

Apr 26, 2009

I want to look up a value in a range of cells and then return a value in a cell in the same row containing the desired value, similar to a vlookup. Except I want to search through several columns for this value and I would like to have it find every occurance of the desired value and return a value in a cell n the same row of each occurance of the desired value.

View 2 Replies View Related

VBA Script That Will Update The Desired Range With Numbers

Nov 27, 2009

I want to make a VBA script that will update the desired range with numbers like so, i have a table:

columns = A - G
rows = 2 - 5

1st case:
if in one of the cells is entered the value 17 the next cell will be 15.
2nd case:
if in one of the cells is entered the value 15 the next cell to be blank.

and from here just loop until the hole table is filled in with the numbers.
basically all the table should look like:
| 17 | 15 | empty | 17 | 15 | empty | .... and so on.

To be honest I've search the forums, google, I've documented myself in some ways, and even tried to make this "program"... I kinda got it right, but with a button, I wanna do it "live" right after entering the value in the cell and hitting enter the table to update. I understood that "Workseet_Change()" is like a (live screen update).

View 9 Replies View Related

Add Refedit To Userform At Runtime

Jun 13, 2007

When creating a userform at run-time, I can add list boxes, command buttons and all the other controls to a userform with code like this

Set newButton = newForm.Controls.Add("forms.commandbutton.1")

Run-time error '-2147221005 (-7FFBFE0D)':
Could not complete the operation due to error 800401F3.
when I try this line

Set button0 = newForm.Controls.Add("forms.commandbutton.1")

View 9 Replies View Related

Debugging RefEdit Compile Error

Jul 9, 2009

I sent the attached to a user who said it wouldn't run when the 'Draw Venn' button is click - some sort of RefEdit compile error. I can't replicate the error and can't find what's causing the error.

I had started using RefEdit control but couldn't get it to work the way I wanted, so just went with input boxes. I run this on XL07 SP2, other user has XL03 - not sure if that's relevant to the error they're getting.

View 4 Replies View Related

Break Refedit To Individual Variables

Aug 1, 2008

I have a userform where users select a range with a REFEDIT control say:

'Sheet1'!$G$38:$AA$39

I need some VBA code to break this down to the following variables:

a variable giving me the first column i.e. "G"
a variable giving me the last column i.e. "AA"
a variable giving me the first row i.e. "38"
a variable giving me the second row i.e. "39"

If it's easy for you, I also need an error handler to ensure that only two consecutive rows are selected by the user.

View 9 Replies View Related

How To Work With RefEdit Tool Within A Userform!

Dec 4, 2008

how to work with RefEdit tool within a userform!

eg: say I use RefEdit to select a range and I want that range to be in Bold.

Just give me a small code using RefEdit to perform the above action. I hope then I can use it in a larger way.

View 20 Replies View Related

Run Macro When Click In Range

Apr 12, 2008

I want a macro I have made to run when I click in a particular range.

The macro I want to run is named: SortSizes

I want the macro to run when I click any cell in the range: A12:A4000

with some code and instructions to do this.

View 9 Replies View Related

Go To Range Name By Double Click

Jul 28, 2014

I have this list of all rangenames in my workbookin column A:A

For some reason I want to doubleclick on the rangename in the list to activate this range.

The reason is that I want more smooth activation-prosess; The Excel Range List is too long to practical use as a direct lookup, so I want to activate directly from my own list (where i have added definitions to the range names.

I have tried to build a hyperlink formula, but failed. Maybe the macro below can be modified to do the job, but I am stuck here as well.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim RangeName
Application.ScreenUpdating = False
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Cancel = True

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

View 2 Replies View Related

Run Macro When Click In Range

Apr 12, 2008

I want a macro I have made to run when I click in a particular range.

The macro I want to run is named: SortSizes

I want the macro to run when I click any cell in the range: A12:A4000

View 9 Replies View Related

Double Click Range

Aug 31, 2009

I have a code for doubleclick on a cell and a gdt application chart will open.

Private Sub Worksheet_BeforeDoubleClicK(ByVal Target As Range, Cancel As Boolean)
ActiveSheet.Unprotect
ThisWorkbook.Unprotect
Dim i As Integer
Dim gdt As Long
Dim S As String
Cancel = True
With Application

If Target.Address(False, False) "C11" Then Exit Sub

'Place your direct path to open this GDT application

S = "C:Documents and SettingsUserMy DocumentsAndy's MachineINSPECTIONGDTGDT BitmapGD&T_Font.exe"

If Dir(S) = "" Then
MsgBox "File does not exist:" & vbCrLf & S, vbCritical, "Error"
Exit Sub
End If
gdt = Shell("""" & S & """", vbNormalFocus)

End With

ActiveSheet.Protect
ThisWorkbook.Protect
End Sub
What would the code be for a range of cells if doulbe clicked the range would be C11 thru C35

Also, I have a double click code for another symbol chart to open.

How, would this be used in the same manner if a coulmn or row were to apply on double click.

View 9 Replies View Related

Go To Range On Cell Click

Dec 1, 2006

I have a spreadsheet with many worksheets in it. Sheet ' Names' has personal data for a person. Sheet 'Credits' has more information about that person's work.

When a cell in sheet 'Names' is clicked, the user is forwarded to cell containing the same name on sheet 'Credits'. I know how to do that with hyperlinks, but its not going to work becuase the list of names is updated.

1. How do I make the Sheet 'Names' react to clicking of the cell? Do I use procedure 'Worksheet_SelectionChange()'?

2. How do I switch sheets to highlight the cell on sheet 'Credits'?

3. How do I compare values in cells that are on 2 different sheets?

The code to highlight the cell is this, i think:

For x = 3 To <some number>
If Cells(x, 1).Value = <value of cell In sheet 'Names'> Then
Columns(x).EntireColumn.Activate
x=x+1000000
End If
Next x

I know this may seem trivial, but I am very new to VBA.

View 9 Replies View Related

Spreadsheet Control With Range

Jan 16, 2010

Hi all im having a tough time trying to figure out a way to select a range (which will be the entire row )based on a condition that will be data selected from a combobox and display that range in a userform with spreadsheet contol 9

what i have so far is a worksheet with all the data.
i have a combobox on a userform that is prefilled with data from a specific column

every thing is working except when i select the entire row how do i change that to a range that i can use in the spreadsheet control 9 that is added to the userform.

View 11 Replies View Related

Control The Sum Range With A Cell

Sep 12, 2007

I would like to define the range of cells in the sum with a number in another cell. Say I want to sum the past 10 years, I would like the sum definition to be controlled by another cell that includes the number 10.

If I want B1 to be the sum of A1:A10, B2 to be the sum of A2:A11, etc., I would like to be able to control the range of the sum with say, C1, which in this case would contain the number 10.

This would allow me to easily change the range of data I am summing: if I changed C2 to 15, B2 would give me the sum of A1:A15 for example.

View 9 Replies View Related

Concatenate A Range Rather Than Click Each Cell

Feb 3, 2009

Can you concatenate a range. I want to join 30+ cells together but dont want to click on every one?

View 10 Replies View Related

Subscript Out Of Range :: Control Sheet

Sep 4, 2009

I have a workbook with 20 sheets, including a control sheet 'Validation Table'. By setting the required Background/Font in a cell named hdrDefault on sheet VT, I want to click a button on VT to invoke a macro to visit each sheet and set the named Header range, hdrxxx, to the same Background/Font. Originally had the code in a Private Sub linked to a button event, but this can't break out of the worksheet so have moved the Sub into a Module, and calling from the click event:

Event:

View 3 Replies View Related

File Access Control Using Range

Jun 29, 2012

I have sheet where I need to restrict access to a select group of individuals. I have a formula in a select case statement that runs from the workbook_open event and have hard coded the names of the individuals who can access the file. If they are not on the list, they are prompted for a password. This works OK, but I have sheet that is hidden and want to maintain the list of users there and update the code to loop through the values in a named range. I have a snippet of the current code below.

Code:
Select Case function_name
Case Is = "user1"
Run "enable_access_code"
Case Is = "user2"
Run "enable_access_code"
Case Is = "user3"
Run "enable_access_code"
Case Else
' User not authorized or opened while not on company network
' Prompt for project password
form_Password.Show
End Select

View 2 Replies View Related

Delete Range Name (control Character?)

Dec 6, 2006

I have a defined range in my workbook which I have not been able to delete (I think it got there through some malware because I didn't create it!)

The main annoyance is that the name refers to another workbook (to which I don't have access) and to a non-existent range therein (resulting in a #REF! error) - so I get the unwanted Update Links message each time I open the workbook. I have created my own workbook with the same name as the workbook referred to by the name, hoping that I may gain some level of control over this gremlin, but to no avail.

The name is "Flow" immediately followed by a thin-lined empty square (like the ANSI character 042 formatted using Wingdings2 font). It could be a line-feed character.

Whatever it is, I have not been able to delete this range name - either directly through the Insert / Name / Define / Delete commands or by using VBA. Using the menu commands I can select the name, edit it (even add a valid cell reference to the workbook name), and click Add - but that just adds a new name "Flow" without the control character and the original name remains! The original name also remains if I select the name and click Delete.

View 6 Replies View Related

Control Print Range Macro

Jan 11, 2008

the macro simply copies a master sheet, then re-organizes/re-sorts the raw data in the new sheet. At the end, I'm trying to set a print range to 1 page wide and inifinity pages long, figure out where the end of the fourth page is, then reset the print range to accommodate four pages. In case it matters, the macro starts with a form that allows the user to input a company ticker and name used in output.

The problem is that when I use the debugging step function (very tedious), it works perfectly. But when I run it normally, it locks up for about 30 seconds when setting the print range to 1 page wide, and cuts off the print range vertically at just over 2 pages tall. Brief explanation of a couple variables:

ColLetter is a function as follows:
Function ColLetter(ColNumber As Integer) As String
ColLetter = Left(Cells(1, ColNumber).Address(False, False), 1 - (ColNumber > 26))
End Function
ActiveSheet.PageSetup.PrintArea = "$A$1:$" & ColLetter(j + 3) & a + 7 .............................

View 2 Replies View Related

UserForm Control To Select Range

Aug 8, 2008

I want a control to select a range in a userform I'm creating.

I wonder if we can use the same type of control the wizards use, where you click on the right and choose the range? Alternatively, what's the best option?

View 9 Replies View Related







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