Grid control excel access grid control vb6 application c vb net grid control vb6 pdf viewer vb6 code lines counter grid control for lotus notes vb6 0 vb6 sqlite3 vb6 sqlite grid activex control vb6 grid control vb6 vb6.0 net data grid control grid net grid control vb6 code lines calculator grid toolkit activex grid control. (VB6) Calculator - Source Code here - posted in Programming: Firstly, you may ONLY copy SMALL ammounts of this code into your own programs, as long as you give some credit to me!!!Heres a calculator i did simply because sooooo many people have tried making one and i keep getting asked for the source code to a VB6 calculator from many people at.
I have a flexgrid with a grouping, and a.subtotal by that grouping. All columns except one are numeric, the one that isn't is in the format 'x/y' e.g. 1 out of 5 items supplied. If I do a.Subtotal with a flexSTSum it sums up the first number in the pair, i.e. In the above example it would sum up the 1 as a decimal and show 1.00 in the subtotal row At first I tried to find a way to sum on another column, i.e. I could put individual values into separate columns, give them a.Width of 0 and sum these into the.Subtotal column of the first column, but I can't find a way to do that. And even if I do find a way to do that I want to be able to custom format the.Subtotal, so it appears as '3/17', i.e.
'1/5' and '2/12' subtotal to '3/17' in the subtotal row. If I can't subtotal off another column I wondered if I could custom access the subtotal row and manually enter the subtotal value of '3/17', but even that seems unavailable. My question is, is there a way to achieve this? I assume you are using the VideoSoft FlexGrid which i never used, so I can't help you with the specific methods of that control. You can do it easily with a standard MSFlexGrid control though, and you can probably do the same with the VideoSoft FlexGrid.
Are you using VB6? Could your question be restated as.
I have a large number (say a Long). How do I place that into a Textbox?
Text1.Text = lngA. Or you could use. Text1.Text = CStr(lngA) But it has the same result. If later you wish to 'retrieve' that number, you can use. LngA = CLng(Text1.Text). Have I correctly assumed what you want?. Or are you asking how to display it formatted?
Text1.Text = Format(lngA, '###,###,##0'). Rob shatcher via visualbasic-l wrote: I hope somebody can help me with this i seem to be stuck. I have a datagrid with the headers Length, Height & Total.
Length. Height = Total and that works but how do I total that up into a textbox thanks Steve. Is your datagrid bound to a recordset via a data control? If so, you might consider operating on the underlying recordset. ITtoolbox visualbasic-lShatcher Just use textboxname.text =cstr(Height. Length) where: textboxname is the name of your text box. If you need to use this result elsewhere, remember that is a string in the textbox.
Original Message - From: shatcher via visualbasic-l To: Bill Liles Sent: Monday, September 22, 2008 6:52 PM Subject: visualbasic-l total up a datagrid with a textbox I hope somebody can help me with this i seem to be stuck. I have a datagrid with the headers Length, Height & Total.
Length. Height = Total and that works but how do I total that up into a textbox thanks Steve.
You mean you want to total all the totals in the grid to produce a grand total in a separate textbox? If so, you need to loop thru the rows in the grid, summing the total column and then assigning that amount to the text box. For i=1 to grid.rows Total=total+grid.col(2) 'assuming col 2 is total col Next Textbox = Total HTH Walter From: shatcher via visualbasic-l mailto:[email protected] Sent: Tuesday, 23 September 2008 09:23 To: wkiess Subject: visualbasic-l total up a datagrid with a textbox I hope somebody can help me with this i seem to be stuck. I have a datagrid with the headers Length, Height & Total.
![Calculator Control For Vb6 Grid Calculator Control For Vb6 Grid](/uploads/1/2/5/5/125500603/958462697.jpg)
Length. Height = Total and that works but how do I total that up into a textbox thanks Steve. Einstein once said. The trick is not in coming up with brilliant solutions.
The trick is, to clearly define the question. I think there should be a prize for which one of us can guess what the question is.
Rob wkiess via visualbasic-l wrote: You mean you want to total all the totals in the grid to produce a grand total in a separate textbox? If so, you need to loop thru the rows in the grid, summing the total column and then assigning that amount to the text box. For i=1 to grid.rows Total=total+grid.col(2) 'assuming col 2 is total col Next Textbox = Total HTH Walter From: shatcher via visualbasic-l mailto:[email protected] Sent: Tuesday, 23 September 2008 09:23 To: wkiess Subject: visualbasic-l total up a datagrid with a textbox I hope somebody can help me with this i seem to be stuck. I have a datagrid with the headers Length, Height & Total.
Length. Height = Total and that works but how do I total that up into a textbox thanks Steve. Well said Rob. Now, if we could only get our clients to clearly state their problem/requirements. Lol Walter From: Rob Crombie via visualbasic-l mailto:[email protected] Sent: Tuesday, 23 September 2008 13:00 To: wkiess Subject: Re: visualbasic-l total up a datagrid with a textbox Einstein once said.
The trick is not in coming up with brilliant solutions. The trick is, to clearly define the question. I think there should be a prize for which one of us can guess what the question is. Rob wkiess via visualbasic-l wrote: You mean you want to total all the totals in the grid to produce a grand total in a separate textbox? If so, you need to loop thru the rows in the grid, summing the total column and then assigning that amount to the text box.
For i=1 to grid.rows Total=total+grid.col(2) 'assuming col 2 is total col Next Textbox = Total HTH Walter From: shatcher via visualbasic-l mailto:[email protected] Sent: Tuesday, 23 September 2008 09:23 To: wkiess Subject: visualbasic-l total up a datagrid with a textbox I hope somebody can help me with this i seem to be stuck. I have a datagrid with the headers Length, Height & Total. Length. Height = Total and that works but how do I total that up into a textbox thanks Steve. Thanks for replying back Rob I'm using vb8 vb2005 standard edtion. I probably didn't explain myself clearly enough as i am just new to programming,My datagrid works like a calculator, you put the length and the height in to get a subtotal. The textbox outside of the grid gives you an overall number, my purpose is to calculate the square footage of wall area with the grid and get an overall square footage into the textbox.
![Calculator Control For Vb6 Grid Calculator Control For Vb6 Grid](https://cramster-image.s3.amazonaws.com/definitions/DC-928V1.png)
I hope this explains what i'm trying to do,My grid isn't binding to anything just works like a calculator thanksSteve -Original Message- Are you using VB6?Could your question be restated as.I have a large number (say a Long).How do I place that into a Textbox?Text1.Text = lngA.Or you could use.Text1.Text = CStr(lngA)But it has the same result.If later you wish to 'retrieve' that number, you can use.lngA = CLng(Text1.Text).Have I correctly assumed what you want?.Or are you asking how to display it formatted?Text1.Text = Format(lngA, '###,###,##0').Regards.Rob. Hi Steve, It sounds like you just need assistance in placing the result(which you already have computed) into a Textbox.
If it was VB6 then the examples I mentioned in my first post will do that. The only trick is to get the display to refresh. VB6 needs a kick to do that.
You can do that one of two ways, by using Refresh or DoEvents. Text1.Text = Format(lngA, '###,###,##0') Text1.Refresh. Text1.Text = Format(lngA, '###,###,##0') DoEvents. I have never used VB.NET (VB2005), so I will defer to those who have, to give you the.NET solution. Regards, Rob shatcher via visualbasic-l wrote: Thanks for replying back Rob I'm using vb8 vb2005 standard edtion.
I probably didn't explain myself clearly enough as i am just new to programming,My datagrid works like a calculator, you put the length and the height in to get a subtotal. The textbox outside of the grid gives you an overall number, my purpose is to calculate the square footage of wall area with the grid and get an overall square footage into the textbox. Thanks anyways Rob, I appreciate any help or advice. Regards Steve -Original Message- Hi Steve, It sounds like you just need assistance in placing the result(which you already have computed) into a Textbox. If it was VB6 then the examples I mentioned in my first post will do that. The only trick is to get the display to refresh.
VB6 needs a kick to do that. You can do that one of two ways, by using Refresh or DoEvents. Text1.Text = Format(lngA, '###,###,##0') Text1.Refresh. Text1.Text = Format(lngA, '###,###,##0') DoEvents.
I have never used VB.NET (VB2005), so I will defer to those who have, to give you the.NET solution. Regards, Rob.