Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #1718

Re: visual studio controls

From "DaveO" <djo@dial.pipex.com>
Newsgroups comp.lang.basic.visual.misc
Subject Re: visual studio controls
Date 2013-02-22 09:55 +0000
Organization A noiseless patient Spider
Message-ID <kg7f8j$7b7$1@dont-email.me> (permalink)
References <5a40821d-c570-4845-9294-8304b8da6abe@googlegroups.com> <6a416320-d9ed-441d-847d-957340be3724@googlegroups.com>

Show all headers | View raw


"colmkav" <colmjkav@yahoo.co.uk> wrote in message 
news:6a416320-d9ed-441d-847d-957340be3724@googlegroups.com...
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?

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. 

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

visual studio controls colmkav <colmjkav@yahoo.co.uk> - 2013-02-20 14:52 -0800
  Re: visual studio controls Karl E. Peterson <karl@exmvps.org> - 2013-02-20 15:21 -0800
  Re: visual studio controls "Auric__" <not.my.real@email.address> - 2013-02-21 01:23 +0000
  Re: visual studio controls GS <gs@somewhere.net> - 2013-02-20 22:46 -0500
  Re: visual studio controls colmkav <colmjkav@yahoo.co.uk> - 2013-02-21 01:17 -0800
  Re: visual studio controls colmkav <colmjkav@yahoo.co.uk> - 2013-02-21 01:20 -0800
  Re: visual studio controls Deanna Earley <dee.earley@icode.co.uk> - 2013-02-21 09:28 +0000
    Re: visual studio controls GS <gs@somewhere.net> - 2013-02-21 13:07 -0500
  Re: visual studio controls colmkav <colmjkav@yahoo.co.uk> - 2013-02-21 11:10 -0800
    Re: visual studio controls GS <gs@somewhere.net> - 2013-02-21 14:22 -0500
    Re: visual studio controls ralph <nt_consulting@yahoo.com> - 2013-02-21 13:43 -0600
    Re: visual studio controls "DaveO" <djo@dial.pipex.com> - 2013-02-22 09:55 +0000

csiph-web