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


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

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

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

Set Textbox Control Source To Hidden Worksheet NOT Active Worksheet?

May 6, 2014

I have created an excel worksheet that will provide budgeting and estimating tools for my project managers. All data used to be manual entry and took a good while to complete. I am trying to automate the process with VBA.

I created a UserForm called InfoVerify1. On that form I have TextBox 1 - 10. When the UF opens, the boxes display project information from my worksheet called "Basis of Estimate", also known as Sheet26.

The TextBox1 ControlSource is set to "E4". When I run the macro with Sheet26 active, the proper information fills in. However, when I am on the Start page or any other worksheet and I run the macro, it tries to fill in the text boxes with E4, etc, from the active sheet. I tried changing the ControlSource to "Sheet26,E4" or any combo thereof with only error messages.

how to get it to refer to a cell on a particular worksheet and hold to that worksheet no matter which sheet I am on at the time I run the Userform?

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

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

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

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

Control Tip For Shape In Worksheet?

Jul 15, 2014

Is there any way to place a Control Tip for a shape on a excel worksheet?

View 3 Replies View Related

Return Control Name On Worksheet

Sep 13, 2007

what is wrong with the following code where I'm simply trying to return (evaluate) the name of a control toolbar object from a sheet: If ActiveSheet.Shapes(1). OLEObject.Name = "TextBox" Then

View 8 Replies View Related

Add TabStrip Control To Worksheet

Jun 14, 2008

When I place an ActiveX TabStrip or a MultiPage onto a spreadsheet, and then try to put a ComboBox onto the TabStrip, the ComboBox will fall behind the TabStrip when I run my pointer across the TabStrip. I used the Arange order from the Draw toolbar to place ComboBox on top and the TabStrip behind, but to no avail. (I would love to use a User Form but lack the VBA know how).

View 5 Replies View Related

How To Write An API To Control The Zoom Of A Worksheet

Apr 19, 2007

I want to know how to make a spreadsheet automatically control the zoom of a worksheet depending on the size of the screen it is opened on. For example, if it is opened on a screen of a certain size then it will set the zoom to 80% so the worksheet will show only a certain section. I want my worksheets to look the same on even the larger screens and not show the unused rows and columns around the section I am wanting to highlight.

In a previous thread I was told I might need to write an API to help me with achieving this. First of all, what is an API? Secondly, how do I go about writing one?

View 9 Replies View Related

Calender Control On Worksheet Shrinks

Sep 10, 2006

I have a spreadsheet with many cells that require a date. I have added calendar control 11.0 and running it with the code below. The problem is, that everytime the sheet is opened, the calendar gradually gets smaller and smaller each time the workbook is opened. I have tried resizing through formatting the object, but after opening the workbook several times, it's has shrunk down to unusable again.

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yy"
ActiveCell.Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("B161:B184,I161:I184,P161: P184,"), Target) Is Nothing Then
Calendar1.Left = Target.Left
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub

View 3 Replies View Related

Worksheet Form Control Properties

Sep 21, 2006

how to get a list of the properties for form control shapes (not control toolbox shapes) that are placed on a worksheet (not on a userform). Eg., a button, checkbox, combobox, etc.

If it's possible, I'm interested in working with properties like "enabled", "caption", etc. that aren't listed on the "Format Control Properties" dialog.

I understand you can edit properties of a form control shape via VBA code (See example below), however, I can't seem to find anything within the object browser about them.

EXAMPLE
With ActiveSheet.Shapes("Scroll Bar 2").ControlFormat
.Min = 10
.Max = 150
End With

View 5 Replies View Related

Stock Control With Controls On Worksheet

May 3, 2008

I would like to know if it's possibale to use VB, to auto manage these levels
IE, 1 box asks for the part number 2nd asks you how many 3rd/4th boxes are "+", "-"
When + or - is pressed the part number will automatically add's/subtracts that part level. I had 10x abcde's I enter 2 in "How Many", then press "-" it will then adjust the level from 10 to 8

View 5 Replies View Related

Print Worksheet With Checked CheckBox Control

Sep 22, 2006

I am creating a main worksheet (Legend) in which information will be entered and then populate to other areas (worksheets) within the workbook. I would like to create a print macro - that will run and print all the worksheets that we have selected on the "legend" page. These worksheets would have been selected by ticking a check box.

My question is how to associate a check box to a worksheet? For example - the second worksheet is named " Schedule A" 3rd "Schedule B" and so on.

- The check boxes will be name schedule A, Schedule B and so on.
- I would like to associate (link) the checkbox Schedule A with the Worksheet of the same name. Then when this checkbox is selected, and the print macro runs it will print the worksheets that are selected.

View 5 Replies View Related

Filter Worksheet Data With UserForm Control

Sep 1, 2007

I have a database in Sheet1, and need to make a drop-down list for each column title, so that it would filter out the necessary letters or words. E.g. I type "au" and see the words starting "au" in one single list (like aura, aubergine, etc..)

View 5 Replies View Related

Calendar Control To Enter Chosen Month As Worksheet

Jul 17, 2009

I have a worksheet that has a Calendar on a worksheet from Calendar Control 8.0.

I want to be able to pick a month from the calendar and press a button to convert the selected month into a worksheet. I have a custom made calendar worksheet that I would like for it to be converted into.

I have uploaded my workbook. It contains the custom calendar worksheet as well as the calendar control.

The file is called "calendar.xls".

View 9 Replies View Related

Select Worksheet Based On ComboBox Control Choice

Sep 1, 2006

i have a user form with 4 combo boxes and one text box. what i've tried to do is make it so that if the month combo box reads january, then all of the info is placed in a worksheet called january. at the moment it is putting all the info inputted into one sheet. if some one could take a peek at the code below.

If cbomonth.Value = January Then
Sheets("January").Select

Range("A1").Select

Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) Or IsEmpty(ActiveCell.Offset(0, 1)) Or IsEmpty.....................

View 9 Replies View Related

Load Worksheet Picture Into UserForm Image Control

Aug 9, 2007

I have an image box on a userform in Excel VB. Is there ANY WAY to load an image into this image box from an object that I have loaded into an excel worksheet something like

If userform1.checkbox1=True Then
userform1.image.picture = loadpicture (Worksheets("Sheet1").shapes("Object 1"))
ElseIf userform1.checkbox2=True Then
userform1.image.picture = loadpicture (Worksheets("Sheet1").shapes("Object 2"))
Else
msgbox "No image"
Endif

View 2 Replies View Related

Calendar Control On Excel Worksheet - Default Start Date

Jul 9, 2012

I have set up a calendar control on a userform and got it to pop up when selecting one of 3 cells on a worksheet. The various bits of code making this work are below.

This code is attached to the Userform.

VB:
Private Sub Calendar1_Click()
With ActiveCell
.Value = Calendar1.Value

[Code]....

What I am struggling with is that I'd like to have the calendar that pops up in cell C18 (which is Date of Birth) default to starting on 1st January 1987 not todays date. Also, if there is a value in either of the 3 cells that use the calendar, then I'd like the calendar to display that date. If the cell is empty then todays date is fine for cells G3 and G26.

View 7 Replies View Related

Excel 2010 :: Open Form From Worksheet Control Button?

Aug 5, 2013

Excel 2010. How/where to define userform object?

Button on worksheet has following code:

Sub Button1_Click()
Load UserForm1
UserForm1.Show
End Sub

Execution of this code generates following error:

Run time error 424
Object required

How/where to define userform object?

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

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







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