Perfect! Thank you so much!Dawn BleuelOn Wed, Feb 29, 2012 at 2:01 PM, Paul Schreiner <schreiner_paul@att.net>wrote:> **>>>> try using:> intResult = int(dblTime)>> actually, you could use:>> dbltime = dbltime - Int(dbltime)>> instead of the "if" statement>> but this would only work if dbltime is > 0>> Paul> ----------------------------------------->...
Rabu, 29 Februari 2012
RE: [ExcelVBA] Re: LISTBOX
Thanks this will help bog time! -----Original Message----- Date: Wednesday, February 29, 2012 7:38:14 am To: ExcelVBA@yahoogroups.com From: "Ralph" <ralph.gregory@skaino.co.uk> Subject: [ExcelVBA] Re: LISTBOX Hi Derek I am trying to follow this and am a bit lost as to where I put the code...I created a new workbook and renamed a sheet Gages then put some data in etc then I created a user form with a listbox on it but now where does your code go and how do I run it....sorry if these are dumb questions but it is still a new world to me.... --- In ExcelVBA@yahoogroups.com, Derek Turner <g4swy@...> wrote: > > Hi All > > Here is my own code to do what Jim wants :-Â > >...
Re: [ExcelVBA] How to convert double to integer
oops... just saw the last line: "Ideally, I want to end up with two variables splitting the whole number from the decimal." in that case, my first answer works. of course, you don't even need the "if" construct. intResult = int(dblTime) will be 0 if the number is less than 1. then : dblTime = dblTime - intResult would simply subtract 0. Paul ----------------------------------------- "Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can." - John Wesley ----------------------------------------- ________________________________ From: Paul Schreiner <schreiner_paul@att.net>...
Re: [ExcelVBA] How to convert double to integer
try using: intResult = int(dblTime) actually, you could use: dbltime = dbltime - Int(dbltime) instead of the "if" statement but this would only work if dbltime is > 0 Paul ----------------------------------------- "Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can." - John Wesley ----------------------------------------- ________________________________ From: Dawn Bleuel <dlbleuel@gmail.com> To: ExcelVBA <ExcelVBA@yahoogroups.com> Sent: Wed, February 29, 2012 2:17:54 PM Subject: [ExcelVBA] How to convert double to integer I need some help...
Re: [ExcelVBA] How to convert double to integer
Hello Dawn intResult = Int(dblTime) dblTime = dblTime - intResult No need for the If maybe ? Derek Turner +++ >________________________________ > From: Dawn Bleuel <dlbleuel@gmail.com> >To: ExcelVBA <ExcelVBA@yahoogroups.com> >Sent: Wednesday, 29 February 2012, 19:17 >Subject: [ExcelVBA] How to convert double to integer > > > >I need some help with something. > >In VBA I have a snippet of code... > >If dblTime > 1 Then >intResult = dblTime >dblTime = dblTime - intResult >End If > >Works great if the value fed into dblTime is 1.454. The intResult = 1 and >the dblTime becomes .454 >...
[ExcelVBA] How to convert double to integer
I need some help with something. In VBA I have a snippet of code... If dblTime > 1 Then intResult = dblTime dblTime = dblTime - intResult End If Works great if the value fed into dblTime is 1.454. The intResult = 1 and the dblTime becomes .454 However, if the value of dblTime is 1.569 then the intResult becomes 2. I need it to stay at 1. I'm sure there is some kind of convert function that I'm not thinking of that will just extract the current whole number, but I've come up blank. Ideally, I want to end up with two variables splitting the whole number from the decimal. Thanks. -- Dawn Bleuel Word MVP [Non-text portions of this message have been removed] __._,_.___...
Re: [ExcelVBA] Re: LISTBOX
Hi Ralph The code at the moment goes into the userform which contains the Listbox1 control and you run it with the F5 key when the cursor is in the code. As this is work in progress I am not sure how Jim intends to fire it off. In due course it would be fired by a Macro button or event handler somewhere. By the way, when I looked at my own post the format was OK, but in the reply to me (and others) indents in the code look like "> Â Â Â Â Â". Also these As (hatted A) are scattered throughout the text. Can anyone explain this or even provide a workround ? I am using Yahoo Mail. Regards Derek Turner +++ >________________________________ > From:...
[ExcelVBA] Re: LISTBOX
Hi Derek I am trying to follow this and am a bit lost as to where I put the code...I created a new workbook and renamed a sheet Gages then put some data in etc then I created a user form with a listbox on it but now where does your code go and how do I run it....sorry if these are dumb questions but it is still a new world to me.... --- In ExcelVBA@yahoogroups.com, Derek Turner <g4swy@...> wrote: > > Hi All > > Here is my own code to do what Jim wants :-Â > > > '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' > ' Â Populate a multicolumn Listbox (with >10 columns) from an Excel range > ' Â Derek Turner...
[smf_addin] Digest Number 2132
EXCEL Stock Market Functions Add-in Messages In This Digest (10 Messages) 1a. 10 Year Summary MSN - only a few elements work From: briansaxo@rocketmail.com 1b. Re: 10 Year Summary MSN - only a few elements work From: Randy Harmelink 2a. Help needed on Excel 2010 and Add ins From: James Shirley 2b. Re: Help needed on Excel 2010 and Add ins From: Randy Harmelink 3a. Retrieved Value Doesn't Match Webpage ...
Langganan:
Postingan (Atom)