Spreadsheet Read Only - Control With UserForm

Jun 13, 2013

I am working an a userform. I want people to add records to the spreadsheet thru the UserForm ONLY, meaning that if they go straight to the spreadsheet they wont be able to edit anything.

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

Macro That Deletes Sheet With Control & Shows UserForm Causes UserForm To Disappear

Jun 15, 2009

This is weird - if you delete a sheet that contained a control then

a. showing a modeless userform resluts in a userofrm that goes invisible at subroutine End
b. public variables lose their value

These things do not happen if the sheet did not contain a control. Attached is an example file - put the inputfile.xls in your default file location (or add a path in the code) then open the ProblemDemo.xls and run the main macro to see it fal - isthis another Excelbug I've found?

View 9 Replies View Related

Referencing Userform Control From Another Userform / Class Via Variable

May 3, 2012

I have several non-modal userforms in my App, some of them have date-fields that require manual entry typing of dd/mm/yy etc (No single userform has more than one date-box in it, this I think may be pivotally useful)

Now the Userform 'Calendar' that is built on the class of the same (cCalendar) name, has the write value line 'ActiveCell.value = theCal.value'

I'm looking to change this to refer to the correct userform.Textbox value, depending on which form is open.

I would imagine I could simply have a global string, whose value is set (or re-set) whenever a Userform is initialized (some sort of 'ActiveUF.value = Me.Name), where I get lost is referring to the components by name, so as to have a case statement by where I go:

Code:

Private Sub theCal_AfterUpdate()
Select Case ActiveUF
Case "AddForm"
application.vbe.components("AddForm").controls("AddFormDatePicker").value = theCal.value
Case "EditForm"
'.... etc
end select
end sub

better way of doing this (instead of passing around the userform name as a variable) - or proper syntax for referring to controls outside of the 'active' userform (but an open userform nonetheless)?

Every time I have to do this particular thing with userforms, I completely forget how, and the object browser always leads me on an infinite loop of Application.vbe.activevbproject.vbcomponents.vbe.active....

PS - there may be one slight complication to the process - one of the forms, has a 2-tab page in it, each page having similar (but named differently) fields. So I may need to be able to throw in 'Activepage' or whatnot

View 5 Replies View Related

Read A Value Into UserForm

Oct 25, 2011

Simply stated:

Range("A5") = Qty
Range("A6") = Cost
Range("A7") = Cost * Qty

In the UserForm:

TextBox1 fills Qty range
TextBox2 fills Cost range

I'd like to have TextBox3 to show the result on Range("A7"). This box would not be enabled, therefore is not clickable or Tab accessible.

I tried

Private Sub TextBox3_Change()
TextBox3.Value = CStr(Range("A7").Value)
TextBox3.Text = Format(TextBox3.Text, "Currency")
End Sub

but that does not do it.

View 6 Replies View Related

Read Worksheet Data Into Userform

Sep 10, 2009

I have setup a userform to record fuel issued to vehicles. I have a text box which I would like to use to display the last meter reading from my fuel pump. This data is stored in the last cell in column F of "Sheet1" workbook. Is it possible to read this data into my userform so when it starts it displays the last pump reading?

View 2 Replies View Related

Have Userform Read Info From Another Sheet

Dec 8, 2009

I have two sheets, the first is "Form" & the second is "Tracking". The "Form" sheet contains one button that, when clicked, brings up a userform. The userform has 11 checkboxes & two buttons ("View Next" & "View Previous"). The "Tracking" sheet has 11 columns (A - K), which will contain either "True" or "False".

I need the checkboxes in the userform to pull the values from the "Tracking" sheet. For example, the "Tracking" sheet has the following information listed: ....

View 8 Replies View Related

Stock Control Spreadsheet

Feb 2, 2009

I have an opening balance colum for the month(I5), then a colum for receival stock for each week in the month + total of stock received for the month(O5), also a colum for delivered stock for each week in the month+ a total deliverd for the month(U5). I wish to then calculate the closing balance in (V5)

Therefore the simple formula =(05-U5)+I5 with the product dispalyed in (V5)

opening balance 3 units(I5) receivals =0(O5) deliveries = 3(U5) closing balance should equal =0 (V5). However the product displayed in V5 is incorrect and shows 6
What am i doing wrong? what formula will give me the correct answer to this equasion?

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

Get Handle To A Control On A Spreadsheet

Oct 13, 2009

How do I get the handle for a combobox on a spreadsheet? I have tried ChildWindowFromPoint and RealChildWindowFromPoint without any luck.

View 9 Replies View Related

UserForm Combobox Read Adjacent Cells

Mar 4, 2014

I have a combobox "cboRCAname" that is populated with a list of names from a dynamic range "RCA_Name" in a worksheet.

If a user selects an item in the combobox from RCA_Name, I want to display the a code that corresponds to that name. The codes are stored in a coulmn adjacent to "RCA_Name"

'Populate the combo box with the dynamic RCA list
Dim rngRCA As Range
Dim ws As Worksheet
Set ws = Worksheets("RCA_Data")

[Code] .....

View 1 Replies View Related

Spreadsheet That Uses Control Functions To Run Vb Code

Feb 1, 2008

i have a spreadsheet that uses control functions to run vb code. i am trying to make things as user friendly as possible for all of the employees. i am currently working on a control to clean out any rows that the first cell has a value of "N/A" or is left blank. i have the code for the blank cells, but cannot figure out how to add the "N/A" cells.

here is the current
Private Sub CommandButton2_Click()
Dim rng As Range
On Error Resume Next
Set rng = Columns(1).SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
rng.EntireRow.Delete
End If
End Sub

View 9 Replies View Related

Setup A Basic Stock Control Spreadsheet

Feb 22, 2009

I've set-up a basic stock control spreadsheet. Part of this requires updating prices of products. My approach was to use 3 columns A,B & C. C would show the current unit price of a product. Where there is a change in price this would be entered in A which would then result in a new average unit price to be calculated automatically in C. When ever this change occurs i need the then 'old' price which was in C to be shown in B aswell.

I've tried using various averaging formulaes but i'm thinking they were probably to basic or just plain wrong

View 9 Replies View Related

Formula- Working On A Spreadsheet To Control The 'booking Diary'

Feb 26, 2007

I've been working on a spreadsheet to control the 'booking diary' at work and linking it with the movements in and out of our 'chambers'

If you look at Column L & M, they are the volumes and column N is where the 'pallet' is coming / going to .

If you look at line 149 and below I've tried to translate these 'volumes' into movements by time but as you can see it is not to totalled up correctly during certain times.

For example line 158 should total 40 and line 187 should total 80.

Can anyone work it out for me as this happens on numerous lines

View 12 Replies View Related

Spreadsheet Control (monitor For The Cell Change Event)

Jun 16, 2009

I have a spreadsheet control inside of a userform. I can generally access this spreadsheet and do what I need to do with it. My problem is that I need to monitor it for the cell change event. I normally accomplish this with:

View 4 Replies View Related

Run Userform: Show A Userform In The Spreadsheet Environment

Jul 25, 2006

how do i show a userform in Excel in the spreadsheet environment? I used to "run macro" but unable to run userform code "private sub".

View 2 Replies View Related

Excel 2007 :: Textbox Control Source Linked To Cell In Spreadsheet?

Oct 10, 2013

I have a userform with a textbox and would like the user to type inside the textbox which in turn send the text typed to a cell on my spread sheet say sheet 1 cell ref A1. I am writing the following into the control source Sheet1!A1 but the control source does not except this. I am using excel 2007 .

View 2 Replies View Related

To Control A Sheet From Userform

Jul 16, 2014

I've a worksheet, which has formulas, links, combo list box and format control.

I've made a user form to enter the data, so that the particular cells in the worksheet is filled and the remaining cells are calculated as per the formula.The format control (combo box) has list of range.

Is it possible to bring this format control (combo box) on the user form, so that without going to the sheet, I Can control the sheet by selecting the combo box values.

View 7 Replies View Related

Cursor Control With Userform

Dec 17, 2008

I have created a simpel userform that shows sales total and it is activated [.show function] whenever an entry is made in the order column. All of this works fine.

The only problem I have is that the curser jumps in to the text box and doesn't return to the order column where next entry needs to be made.

How do you move the curser out of the userform, back to the activesheet?
Ideally it should move to the next cell for the user to make entry.

I am attaching my sample file here. It has some odd things that I was just playing around with as learning experience. But the main question is how to control the curser.

View 8 Replies View Related

VBA Userform Image Control

Jan 13, 2014

I have a userform with multiple images

I would like to set all images to visible = false when images are dynamically named.

E.g. image names:
Image73om3
Image4y45h
Image12AB2

Is there a way to say

Code:
With all images
visible = false
End With
or

Code:
image*.visible = false

View 5 Replies View Related

Toolbar Control On Userform ..

Apr 3, 2008

I've got the bare bones of a toolbox control on my userform but I can seem to find anyway to refer to the buttons and control them (I’ve tried using the properties page but it doesn't seem to give me the options I need). I want to be able to add a macro and a picture to the buttons, is this possible?

Eg.

With Userform1.Toolbar1.button("x")

.image/picture/faceid = “x”
.action = "macro1"

end with

I've looked for ages on the board but can only find threads on creating toolbars in the application, not on userforms.

View 9 Replies View Related

UserForm Control Looping

Nov 12, 2008

Split off from Loop Through ActiveX TextBox Controls On Worksheet. Here is a zip file with the files in it. The main one that I am working on now is PO Form.xls. I want to start with the Qty column and copy any values that are entered into the form to the file called PO.xls in the Qty column of this file.

View 2 Replies View Related

Filling Control On Another UserForm

Aug 18, 2006

I am trying to add a list of items to a combobox on form1 from form2 where form 1 has a variable name.

I can use:

x = UserForms(0).Name
VBA.UserForms.Add(x).show

to show a userform with a variable name but I can't get it to add anything to the combobox using this

VBA.UserForms(x).Combobox1.Additem

View 4 Replies View Related

Hyperlink UserForm Control

Oct 10, 2006

I am looking for Hyperlink Control or any other control that I cam add to my form. When I move mouse on it and press it open to me attachment.

View 2 Replies View Related

Userform Control Blink

Mar 18, 2007

This code works fine on a normal userform But I declared the userform with "New" in my calling procedure

myForm As New form

How can I get it to work??
Or more interesting, why is it not working
Also what exactly is the advantage of using the keyword New
I have propertys set in the userform, but other than that..
Can someone tell me if the load function in this case is better or not

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub cmd_click
Call blink
End Sub

Public Sub Blink()
Dim i As Long
For i = 1 To 20

' set color
Form.cmd.BackColor = &HFFFFFF
DoEvents
Call Sleep(60)

Form.cmd.BackColor = &HFF& .....................

View 2 Replies View Related

Generic Sub For Image Control In Userform?

Aug 9, 2014

My final version will have more than 40 images with all the same code: they will all increment a corresponding SpinButton with 1.

[Code]....

View 13 Replies View Related

Setfocus From Module To Userform Control

Jan 1, 2009

I have a project with many textboxes on different forms. On some of the textbox_exits on some of the forms, I call a standard module that checks what the user has input. If the user needs to change the input, a msgbox appears to inform the user the info needs to be changed.

I have tried to use ControlSource, Name etc., But I cannot seem to setfocus back onto which ever textbox the input needs to be changed. I think it has something to do wih the _exit event, but not sure.

View 4 Replies View Related

Find Position Of Control On Userform

Feb 14, 2013

I have a user form where two command buttons are set with the following code:

Code:
Private Sub CommandButton1_Click()
Frame1.Visible = True
Frame2.Visible = False

[Code]....

Now, when cmdbtn1 is clicked, frame1 is visible and vice-versa.

However, the position of both the frames on the user form are not on the same position on the user form. Indeed, it takes the position of the design view.

I want a code which will place the frame1 and frame2 at the same place and position on user form, irrespective of its position in the design view.

View 2 Replies View Related

Adding Control On Existing Userform On The Fly

Jul 21, 2013

What I missed. I already added the MS VBA Extensibility 5.3 on a VBA Reference. but still got an error.

Line1: Dim objForm as object
Line2: Set objForm = ThisWorkbook.VBProject.VBComponents("UserForm1").Designer
Line3: Set Butn = objForm.Controls.Add("Forms.CommandButton.1")

The error is on Line3, "Runtime Error '91': Object Variable or With block variable not set".

View 2 Replies View Related

Use PropertyGrid Type Control On UserForm?

May 29, 2014

I would like to use a PropertyGrid type control on my UserForm. Is there an effective way to wrap this control and create an add-in to use in VBA?

View 1 Replies View Related







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