Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

visual studio controls

42 views
Skip to first unread message

colmkav

unread,
Feb 20, 2013, 5:52:31 PM2/20/13
to
Hi, I am trying to convert an old VBA project that uses an Excel Workbook as the user interface. I want to replace the interface with a VB.net project using VB.net controls instead. which would be the best control to use in my application?

My current spreadsheet has a start button and a list of jobs with a check box for each specifying whether the job is to be run or not.

Karl E. Peterson

unread,
Feb 20, 2013, 6:21:06 PM2/20/13
to
colmkav brought next idea :
> Hi, I am trying to convert an old VBA project that uses an Excel Workbook as
> the user interface. I want to replace the interface with a VB.net project
> using VB.net controls instead. which would be the best control to use in my
> application?

"Self-", I'd have to say. WTH would you want to do that?

--
.NET: It's About Trust!
http://vfred.mvps.org


Auric__

unread,
Feb 20, 2013, 8:23:25 PM2/20/13
to
colmkav wrote:

> Hi, I am trying to convert an old VBA project that uses an Excel
> Workbook as the user interface. I want to replace the interface with a
> VB.net project using VB.net controls instead. which would be the best
> control to use in my application?

Depending on exactly what you're trying to do, you could probably just use a
DataGridView control.

> My current spreadsheet has a start button and a list of jobs with a
> check box for each specifying whether the job is to be run or not.

This group is almost entirely people who are using pre-.Net VB (i.e. VB6 and
older). For future .Net questions, you could *try* asking here:

microsoft.public.dotnet.languages.vb

...but that group is pretty dead nowadays.

--
This world is mine, in time.

GS

unread,
Feb 20, 2013, 10:46:07 PM2/20/13
to
colmkav explained on 20/02/2013 :
You could use a 3rd party spreadsheet control if you need spreadsheet
features/functionality. If not then a grid control as _Auric suggests.

I bought Farpoint's Spread.ocx ActiveX control back when MS released
the Ribbon so I could make all my Excel-based apps standalone Windows
apps using VB6. It works great! (Farpoint is now GrapeCity, and they do
have a dotnet version of the control. It's not cheap!!)

In addition to Karl's comment, I can't imagine why you'd want to go
with dotnet if you're already familiar with VBA since dotnet's an
entirely different language (despite name similarities). VB6 is as
close as you'll get to VBA, and most all of the code is portable beteen
the two!

I went back to Excel-based apps because that's what clients wanted
(popularity rules in the corporate world), so I've settled on combining
VB6 and Excel via automation. I still use my Spread.ocx for proprietary
projects, though.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


colmkav

unread,
Feb 21, 2013, 4:17:04 AM2/21/13
to
On Wednesday, February 20, 2013 10:52:31 PM UTC, colmkav wrote:
> Hi, I am trying to convert an old VBA project that uses an Excel Workbook as the user interface. I want to replace the interface with a VB.net project using VB.net controls instead. which would be the best control to use in my application?
>
>
>
> My current spreadsheet has a start button and a list of jobs with a check box for each specifying whether the job is to be run or not.

thanks for the responses. The reason why I am doing it in VB.NET is because I am trying to learn VB.NET in order to improve my skill set so I have more employment opportunities.

colmkav

unread,
Feb 21, 2013, 4:20:23 AM2/21/13
to
On Wednesday, February 20, 2013 10:52:31 PM UTC, colmkav wrote:
> Hi, I am trying to convert an old VBA project that uses an Excel Workbook as the user interface. I want to replace the interface with a VB.net project using VB.net controls instead. which would be the best control to use in my application?
>
>
>
> My current spreadsheet has a start button and a list of jobs with a check box for each specifying whether the job is to be run or not.

btw, is there any good side you can recommend for example applications which I can look at to see what choices are made for such decisions ie choosing which controls to implement for certain situations?

Deanna Earley

unread,
Feb 21, 2013, 4:28:34 AM2/21/13
to
As I'm already damned to hell, I might as well say:
Use a ListView with the CheckBoxes property set to true.

I expect the other grid controls also have a similar property.

--
Deanna Earley (dee.e...@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be ignored. Please reply to the
group.)

GS

unread,
Feb 21, 2013, 1:07:37 PM2/21/13
to
Deanna Earley explained :
> As I'm already damned to hell, I might as well say:
> Use a ListView with the CheckBoxes property set to true

I wish I thought of that (or a listbox)!<g> It certainly makes for a
simple solution.

colmkav

unread,
Feb 21, 2013, 2:10:43 PM2/21/13
to
On Wednesday, February 20, 2013 10:52:31 PM UTC, colmkav wrote:
> Hi, I am trying to convert an old VBA project that uses an Excel Workbook as the user interface. I want to replace the interface with a VB.net project using VB.net controls instead. which would be the best control to use in my application?
>
>
>
> My current spreadsheet has a start button and a list of jobs with a check box for each specifying whether the job is to be run or not.

thanks, I have chosen the listview.

A follow up question: I am conceptually trying to think what I should do in order to keep the results of the form somehow. When I used an Excel workbook as the interface I would store values such as the time the job was run etc. In Excel, it was simply a case of saving the workbook to keep these details of the last run but how would I do this with a form?

GS

unread,
Feb 21, 2013, 2:22:17 PM2/21/13
to
colmkav presented the following explanation :
I use a delimited text file with field names in the 1st line. This lets
me dump the data into an array OR use ADODB recordset. In the case of
using the aforementioned Spread.ocx, it imports the data directly.
Using the listview you'd need to populate columns with a For...Next
loop since that's not a grid control.

ralph

unread,
Feb 21, 2013, 2:43:59 PM2/21/13
to
On Thu, 21 Feb 2013 11:10:43 -0800 (PST), colmkav
<colm...@yahoo.co.uk> wrote:


>
>A follow up question: I am conceptually trying to think what I should do in order
> to keep the results of the form somehow. When I used an Excel
> workbook as the interface I would store values such as the time the
> job was run etc. In Excel, it was simply a case of saving the
> workbook to keep these details of the last run but how would I do
> this with a form?

There are several methods... (in addition to GS's advice)

1) Use SaveSettings - save to registry
2) Store the values in "hidden" cells
3) Store in Public Declarations
4) Set the Control values as the default values

And probably a few others I can't think atm. <g>

DaveO

unread,
Feb 22, 2013, 4:55:27 AM2/22/13
to

"colmkav" <colm...@yahoo.co.uk> wrote in message
news:6a416320-d9ed-441d...@googlegroups.com...
Hi

This simple function will make a string with which can then be saved to
disc.
I'll leave you to work out the reverse needed to load it back to a LV.

Public Function ReadLV(LVName As ListView) As String
Dim x_Cell As Integer
Dim y_Cell As Integer

With LVName
For y_Cell = 1 To .ListItems.Count
ReadLV = ReadLV & .ListItems(y_Cell).Text
For x_Cell = 1 To .ColumnHeaders.Count - 1
ReadLV = ReadLV & vbTab & .ListItems(y_Cell).SubItems(x_Cell)
Next
ReadLV = ReadLV & vbCrLf
Next
End With
End Function

If it's a really long list or one that has a lot of columns, you'll probably
want to modify it to use a stringbuilder of some kind.

Regards
DaveO.


0 new messages