Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


Advertisements:










What Is Difference Between Userform_activate And Userform_Initialize


I need to understand the difference between userform_activate and userform_Initialize.

When do I use one or the other or both.


View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
UserForm_Activate & _Initialise Will Not Run
I am adding a UserForm to speed data entry for our test engineers. This has 3 pairs of TextBox & SpinButtons for selection of product & test plus the test result. Also an Exit button & 2 labels.

_Initialise & _Activate is supposed to set the text for the TextBoxes plus values for the SpinButtons, default or otherwise.

Neither will run. Have tried location the procedures under Forms & the applicale Sheet, but no avail.

Have now stripped out all the code apart from Message Boxes & some text to try & debug.

What is preventing the routines from running?

View Replies!   View Related
UserForm_Initiaize Vs. UserForm_Activate
My question is about the difference between UserForm_Initialize and UserForm_Activate. I don't understand what sets them apart. Or why they are used. The reason I ask is, I have made 5 ComboBoxes. Array values are assigned to each combo box.

However, which particular array values are assigned to ComboBox2 are dependent on what the user chooses in ComboBox1. And which array values are assigned to ComboBox3 are dependent on what the user chooses in ComboBox2, and so on and so forth, all the way up to ComboBox5.

My understanding is that all ComboBox values are assigned/populated in the UserForm_Activate procedure. Is this correct? If so, am I right to believe the best/only approach to creating the ComboBoxes I described is by calling the UserForm_Activate procedure everytime a ComboBox value is chosen by the user?

View Replies!   View Related
UserForm_Initialize
It is not Initializing.

Sub test()

UserForm1.Show

End Sub

Private Sub UserForm1_Initialize()

UserForm1.TextBox1.Value = 8

End Sub

View Replies!   View Related
Userform_initialize - Reset A Form
I have created a form containing a list box. This list box contains values (Items) that correspond to a particular product (i.e. each time I view a new product, I need to see a new list of items in the list box). I have used Userform_initialize to set the Items (see below). The values are themselves drawn from a spreadsheet. I have only pasted the piece of code in question - I have a lot more code prior to that in order to define the variable "varcount".

Userform_initialize
Dim w As Workbook
Dim varLine As Integer
Dim varcount As Integer
Dim vItem As String
Set w = ThisWorkbook
For counter = 1 To varcount
Selection. Offset(0, 0).Select
vItem = Selection.Value
frmCheckTwinSku.lbTwinSku.AddItem (vItem)
Selection.Offset(0, 1).Select
Next counter.........................

View Replies!   View Related
UserForm_Initialize Code To Test Certain Cells
The below code tests a particular cell before displaying the userform. If Range ("Bal_BF") contains an error (such as "#N/a"), a message box is displayed and the form should NOT display.

However, the code is still trying to display the userform, and gives me a error message "Object variable or With Block variable not set".

When Bal_BF contains a value, the form displays correctly.

Private Sub UserForm_Initialize()

If Employee = "" Then Call Retrieve

If IsError(Range("Bal_BF")) Then
Call MsgBox("Your name doesn't appear in the Holiday & Absence file." & vbCr & vbCr & _
"Please see Leila Fretton or Neil Jimack about this.",.........

View Replies!   View Related
Initialize Error "Sub Userform_Initialize" With Multiple Comboboxs & Lists
I have a userform used to insert new vehicle details onto a spreadsheet. below is the code used in two of the boxes to choose the service intervals and the engine type. There is another combobox on the form, however when I try the same type of code for more than 1 box I receive an error on the "Sub Userform_Initialize" line. I assume I need to change something on the 'Sub' line but I cannot figure out what!!

View Replies!   View Related
Age Difference, 45, 50, 55
I am trying to work out to get the following result.

Using Cell CB5 as a Date Of Birth, I want to be able to have cell CA5 return "Yes: if the following is either met..

If under 45, Cell

View Replies!   View Related
Difference Between Sum(a1/a2) And (a1/a2)?
I read from one of the posts here and see sum(a1/a2). I tried it on excel and see no difference between sum(a1/a2) and (a1/a2). if there is a difference, could you please highlight to me? If not, why put 'sum'?

View Replies!   View Related
Difference Between Two Times
I would really appreciate your help

I have a client who weants to work out the total number of hours (not minutes) between two times. I have managed to do that with no problem using the formula =IF(A2>B2,B2-A2+1,A2+B2). However, this is where the problem starts.

They want to multiply the number of hours with the number of men on the job, but the answer is wrong, and I cannot understand why. I have checked the formnat of the cell and changed it to see if that is the problem, but without success.

I have copied it below

Time inTime outNo hoursNo of MenTotal Man Hours
12:0003:001526
14:0018:00474

View Replies!   View Related
Difference Between Dates
I'm trying to figure out a formula that tells me how many reports are overdue.
A report is due every six months. There may be times when more than one report got missed.

Right now, I have the Y6 recognizing that a report is late... period.

=IF(V6>(TODAY()),0,1)

So, what I need is:
If the Time Difference between V6 and T6 is greater than 6 months, divide the difference by 6 mos and return the answer to cell Y6 (rounded down with no decimals).

See attachment.


View Replies!   View Related
Difference Between Imdiv And / ?
Could someone explain to me what the difference is between these the two examples given in this worksheet?

View Replies!   View Related
If(iserror) And If(n) - Any Difference
I learnt a new formula from this forum which -> if(n=(a1),a1,"S"). I use another formula -> if(iserror=(a1),a1,"S"). It comes out the same result.

May i know what is the main difference between these two formulae?

View Replies!   View Related
FIND DIFFERENCE BETWEEN >50 AND <60
For Eg: i have 1000 students...i entered marks to all the students now i
need to fine the total students who have score >50 and <60 in each subject..

View Replies!   View Related
Difference Between Private Sub And Sub
I have two funtions which I am trying to put in ThisWorkbook.

Private Sub Workbook_Open and Private Sub 2. The Workbook_Open calls on Sub 2.

Now, with both of these in ThisWorkbook, I get the error that Sub 2 macro cannot be found.

And if I put the Sub 2 in a module, everything works.

Now, I am trying to put both in ThisWorkbook instead of only one.

View Replies!   View Related
A Difference In Times
I have a form for weather warnings that has time of issue in cell B19, and the time of occurrence in cell D19, and the times are in a 24hr military style time format (1600, or 1735, etc).

I need cell G19 to tell me the time difference between the two in hours and minutes, but here's the catch - if cell B19 has an earlier time, I need it to display the difference as a positive number, indicating that I issued the warning before the event actually occurred. If D19 is earlier, I need it to display in cell G19 as a negative number, indicating that the event occurred before I had a chance to issue the warning.

View Replies!   View Related
Get Difference In Corresponding To Names
In the below table, I was trying to get the difference in ColB corresponding to Names in ColA..

ColA ColB ColC ABC 28 1 MNO 12 1 ABC 27 1 ABC 26 2 ABC 24 1 ABC 23
XYZ 16 3 MNO 11 1 MNO 10 1 MNO 9 -1 MNO 10
XYZ 13
?

View Replies!   View Related
Difference In Dates
I have the following dates in column A

22.01.09
23.01.09
30.01.09

And I have the following in column B

Closed 28.01.09
Closed 24.01.09
Closed 02.02.09

I need to calculate the difference of days between column A and column B.

Is there a formula that I could use?

View Replies!   View Related
SUMIF On A Difference?
I have a spreadsheet that records a bunch of golfer's scores for a round of golf.
I have a range G10:X10 that shows Par for each of the 18 holes.
I have many rows below that, G11:X11 is one example, that are individual golfer's scores.

I'd like to add a column, say in column AC, that would count the number of birdies each golfer had in the round.

Thus, I was thinking something like this in AC11:
=SUMIF(G11:X11 - G10:X10,"=-1").

Of course that doesn't work. I need some way of creating a range of 18 differences for the first parameter of the SUMIF function. I know that I can write a VBA macro for it or add another row for each golfer with the difference (but that would double the size of the spreadsheet). Is there an elegant way to do this with a worksheet function given just the scores and par for all 18 holes.

View Replies!   View Related
Get Difference Between Two Times
I need a formula that gives me the difference between two different times

EG. 11:14:56 and 16:14:26, i want to find the difference/time between the two. Hope i'm making sense...

Also, does the time have to be in a time format on excel for the formula to work?

View Replies!   View Related
Difference Between Two Dates
I want to take two dates, a start date and an end date and get the number of days elapsed.

I also want to enter the dates quickly, as in 070808 for 07/08/08 (not having to enter the dashes). I have tried 00/00/00 and ##"/"##"/"## in the cells format, number, custom.

Using that format, entering 070808 in A1, and 070809 for A2 and finally in A3 =DATEDIF(A4,B4,"d") to get the difference in days. What I get is 1 day instead of 365 days.
So it's thinking 70809 - 70808 = 1.

How do I get it to give me 365 days? What format can I use in the date cells?

View Replies!   View Related
What's The Difference Between Cell A1 And B1
what's the difference between cell a1 and b1?. see attachment.

View Replies!   View Related
Lookup The Difference
i m try to use the lookup function but not sure which one i want

the cell to look up is e1
the cells it could be in are a1:a20
the answer will be next to the answer in b1:20

View Replies!   View Related
Date Difference Average
I have 2 column as below and I want to calculate the average number of days
ABC occurs.. In this case it should be 3.33

Col A Col B
01-AprABC
01-AprDBA
01-AprABC
03-AprGRT
05-AprHTA
05-AprJYU
08-AprABC
08-AprGRT
08-AprHTA
10-AprJYU
11-AprABC

View Replies!   View Related
Calculate Difference In Dates
I need to calculate the amount of time between two dates, and show it in the number of hours and minutes. My dates are formatted to show the time in Zulu time. So 1406 = 2:06PM.

Here is what I have:

A1 = 6/4/08 1406Z
B1 = 6/5/08 0402Z

For this example, the formula should return a result of 13 hours and 58 minutes. With the result, there is no need to desingate Zulu time with a 'Z'. But I need the result in a format that will allow me to calculate an average for all my data.

View Replies!   View Related
Showing A Difference Between Values
I have a spreadsheet with a lot of rows and there are three columns that can have a one of two values in it. These values are constantly changing from row to row, not just like a yes or no sort of thing. However 80% of the time they are the same values in all 3 columns, but I want some way of quickly identifying when there is a difference between column G, I, & K which are my three column names. So is there a way of conditionally formatting this to make a difference highlight in red or something like that?

View Replies!   View Related
Calculate Date Difference
I request a help:

A1 = 01-Apr-2009
B1 = 02-Apr-2009
C1 = 03-Apr-2009
D1 = Blank
E1 = 05-Apr-2009
F1 = 06-Apr-2009

What is the best suitable formula to find "First blank cell", then "date difference" between today and its previous cell's (i.e today minus "C1" in this case).

View Replies!   View Related
#NUM! Message When Getting Time Difference
does anybody knows an idea how to get the time difference without getting the #NUM! error message?
Column A contains Start Time while Column B contains end time, if the time in column A is 11:45 PM and the time in column b is 12:15 AM, then I would get this error message...any idea how can i get the time difference without having to use the [hh]:mm format? i would like to use the hh:mm AM/PM format instead.

View Replies!   View Related
Difference In How A Cell Is Selected
When I write a macro in Worksheet_SelectionChange event, excel doesn't know the Target.Address if the cell is selected via Tab key or selected via search feature of excel. It only recognizes the Target if it is selected via mouse click.

Is there a way around this, so the selection_change event would respond properly?

View Replies!   View Related
Highlighting The Difference In Strings
I am using the function "Exact" to compare 2 strings but I would like to highlight the difference if possible.


View Replies!   View Related
Is There A Difference Between Select Case And If..Then
Is there any difference between these 2 codes:

View Replies!   View Related
Conditional Difference Between Two Cells
I have to calculate the difference of two cells in an excel sheet if the first cell value is greater than the second one. If the first cell value is smaller than the second one then the difference should be shown as zero.

View Replies!   View Related
What Is The Biggest Difference Between Numbers?
The attached sheet has two rows of numbers. The top one shows used energy, the bottom one produced energy. What I need to know is during what period of the day one has the biggest difference between the two. In this case this is between 1400 and 2000, 28 used and 9 produced (a difference of 19). The question is how this difference can be determined automatically?

View Replies!   View Related
Difference Between Peaks In Excel
to calculate the difference between peaks in an excel graph, but i need to do it between every two peaks.. I was just wondering could anyone tell me how to do this with some sort of formula or a vba file

Ive attached a picture. I need to calculate the difference between the blue peaks along the x-axis.

View Replies!   View Related
Get Percentage Difference Between Two Colums
How do i work out the percentage difference between two colums and show the results in a third? I then need to know the average of that third colum

View Replies!   View Related
Difference Between MAX And Application.WorksheetFunction.Max
what is the difference between them.
If i know how many rows there are in a column I guess i can just use MAX, right?

View Replies!   View Related
Difference Between Combobox And Listbox
I must be overlooking something. Apparently, there is some difference between comboboxes and listboxes that I was not aware of. When I use the following code to populate a listbox, it works perfect:

Private Sub UserForm_Initialize()
Dim GrowerData() As String
Dim GrowerRange As Range

SheetTwoLastRow = Worksheets(2).Range("A2").End(xlDown).Offset(1, 0).Row

View Replies!   View Related
Time Difference To Be Calculated
Date OutTime OutDate InTime InTime Difference

01-03-099:0001-03-09NIL
02-03-09NIL02-03-09NIL
03-03-09NIL03-03-0910:002 day(s) 1 hours 00 mins
03-03-0911:1503-03-0918:000 day(s) 6 hours 45 mins
04-03-099:00NILNIL
05-03-09NILNILNIL
06-03-09NILNILNIL
07-03-09NIL07-03-0914:453 day(s) 5 hours 45 mi

In Column E in want the time difference to be calculated as shown above.

View Replies!   View Related
Calculate Difference To Lowest
I'm looking for a macro or formula that can calculate the difference to the lowest of col C based on option in colB. See attached. I complete what it should look like in F. Basically, this can be done by sorting the data by colB and using this formual for every group. =C2-MIN($C$2:$C$4). This is not ideal because I have many of these to do and you have to adjust the min range for every group. Plus group sizes will vary.

There has to be a better way. Ideally, I would not like to have to sort the data, unless a macro did it for me....


View Replies!   View Related
Trying To Calculate The Difference Between Two Dates
This is more of a query on date dif

I was trying to calculate the difference between two dates on excel

I had a look through the search message board and searched the web generally where I came across the datedif function

I had found that in order to get the number of years it was

=datedif(startdate,enddate,"Y")

for months same formula"YM" and for days use "MD" in place of "Y" in the original formula

My question is when using datedif to calculate the number of days between two days it initialy gave me the right answer

Number of days between 01/08/2008 - 22/08/2008 - Answer 21 days

Using date dif gave me 21 days but when i did

01/08/2008 - 01/09/2008 - this gave me 0

Am I entering the formula wrong or does datedif simply not pick the difference if the days havent changed even though the month has ?

I then found i could simply minus one from the other , which then had me asking what is the point of date dif

View Replies!   View Related
Properties :: Difference In Size
In the properties in one of my wb's the Size measures to 1,40 MB, but the Size on disk only measure 408 KB. If I make a copy of the same wb, the copy displays 1, 40 on both.

Why do I have a different size on the original?

View Replies!   View Related
Lookup (V?) To Clearly Show Difference
how to create a macro of some sort that will look at a list of data in cloumn A and in Column B then tell me the values of data that is in A but not in B then also tell what is in B that isnt in A. I understand that 2 vlookups will prob do this but i would like it more user friendly so the way i would like it...........

is for me to paste a list of data from 1st source to column A
then, a list of data from 2nd source to column B

then click a button that would do a lookup from column A against B (and B against A)

and return the values on sheet 2

that way... users could look on sheet 2 and anything in column A would be data that was in column A in sheet 1 but not in B and the data in cloumn B (sheet 2) would be the data that was in column B on sheet 1 but not in A.

View Replies!   View Related
Vba: Difference Between Sheet And Modules
If I put:

Sub t1()
Worksheets("sheet1").Cells(1, 1).Value = "abc"
End Sub

on sheet1, it works. But if I put it on module1, then it does not work. What do I miss here?

View Replies!   View Related
Find The Largest Difference
I have a pivot table that shows values grouped as ranges in the row, Gender as the columns and an average % value in the data.

In a cell outside of the pivot I would like to be able to produce the name of the range that has the largest difference between male and female.

View Replies!   View Related
Difference In Dates For Specified Time
Formula query
Column A list of dates correspondence in
Column B list of dates correspondence reply out
Need to calculate how many times the difference between date in and reply date is <= 5 in a specific time period.

The start date is entered in say, K1
The end date is entered in say, L1

Also calculate difference in dates between 14 days and 21 days for time period
Also with reply in column B not sent until over 28 days. I have tried SUMPRODUCT with (date_in=K1)*(date_out<=L1) for the dates but unsure how to define <=5

View Replies!   View Related
Difference Between Range And Array
i want to understand the difference between array and range i feel this is misleading ,,

View Replies!   View Related
Calculating Difference Pivot Row
I created a Pivot Table whose columns are different years (2007, 2008). I would like to show the growth (or not) of the percentages from the years. For example

Dept. 2007 2008 Growth

Bio 97% 56% -41%

View Replies!   View Related
Percentage Difference Between Two Values
I am trying to create a formula that can work out the % difference between two values. The formula I am using is:

=(B1-A1)/ABS(A1)

So, where

A1=1, B1=2, = 100%
A1=-1, B1=2, = 300%

This seems to work perfectly, apart from where there are zero numbers involved. The answers I want to have are as follows:

A1=0, B1=0, = 0%
A1=0, B1=-1, = -100%
A1=0, B1=1, = 100%
A1=-1, B1=0, = 100%
A1=1, B1=0, = -100%

View Replies!   View Related
Difference Between Colums In Pivot
I have an excel sheet with a pivot table with some data about the trades that I have done in the stock market. Before reading the query request you to please have a look at the attachment as I have referred a few data columns.

Coming to the pivot table, in column 'I', I have the 'Total Sum of Trade Value' column which basically adds up the data frome columns E and G (i.e. Sum of trade values under 'Buy' and 'Sell'). I also have the brokerages paid for buying as well as selling and the brokerages are summed up in column J. Basically, what I want to do is to be able to get a difference between different columns within a pivot table. So I want a column which will have 'G-E-J' (Sum of Sell value - Sum of Buy value - Sum of Brokerage). I could click on one of the data fields and after selecting Value filed settings, it shows the summarized by tab.

View Replies!   View Related
If Statement: Need To Display The Difference
If the first 2 columns do not equal 9, the third column needs to display the difference. I tried a normal 'IF' statement, but I'm a little to novice it seems.

View Replies!   View Related
Time Difference In Seconds
Given any two timestamps with the format

dd-mmm-yyyy hh:mm:ss AM/PM

How to calculate the total time difference in seconds.

For e.g. calculate the time difference in seconds for following

07-Nov-2009 00:00:01 AM
06-Nov-2009 11:59:59 PM

Answer should be 2.

View Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved