Click here to Skip to main content
15,867,756 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questioncode for automatic select value from ms-excel column Pin
muhammadataulhaqsultani22-Jul-09 17:57
muhammadataulhaqsultani22-Jul-09 17:57 
AnswerRe: code for automatic select value from ms-excel column Pin
Sumit Prakash Sharma22-Jul-09 21:26
professionalSumit Prakash Sharma22-Jul-09 21:26 
GeneralRe: code for automatic select value from ms-excel column Pin
muhammadataulhaqsultani23-Jul-09 16:08
muhammadataulhaqsultani23-Jul-09 16:08 
QuestionMulti-D Array comparisons Pin
Member 437454222-Jul-09 15:18
Member 437454222-Jul-09 15:18 
AnswerRe: Multi-D Array comparisons Pin
Luc Pattyn22-Jul-09 15:47
sitebuilderLuc Pattyn22-Jul-09 15:47 
GeneralRe: Multi-D Array comparisons Pin
Member 437454222-Jul-09 16:09
Member 437454222-Jul-09 16:09 
GeneralRe: Multi-D Array comparisons Pin
Luc Pattyn22-Jul-09 16:10
sitebuilderLuc Pattyn22-Jul-09 16:10 
QuestionHow do I modify a class so you can convert a String to it? Pin
i_kant_spel22-Jul-09 9:48
i_kant_spel22-Jul-09 9:48 
This is a stub version of the actual problem.

Here are two files. Form1.vb, which looks like this:

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim myIKGrid As New IKGrid
        myIKGrid.Columns(0).Caption = "English"
        myIKGrid.Columns(0) = "Zero"

    End Sub
End Class


You cannot modify Form1 for any reason whatsoever.

The other file is IKGrid.vb. It looks like this:

Public Class IKGrid

    Public Property Columns(ByVal s As Short) As IKColumn
        Get
            Return Nothing
        End Get
        Set(ByVal value As IKColumn)

        End Set
    End Property

End Class

Public Class IKColumn

    Public Property Caption() As String
        Get
            Return ""
        End Get
        Set(ByVal value As String)

        End Set
    End Property

End Class


You can modify IKGrid any way you please.

Anyway, this code results in a compile error. The line:
myIKGrid.Columns(0) = "Zero"

causes
Value of type 'String' cannot be converted to 'IKColumn'


So, how can you modify the IKGrid file so that the String CAN be converted to an IKColumn? The project doesn't need to do anything useful, it just needs to be able to compile without errors.
AnswerRe: How do I modify a class so you can convert a String to it? Pin
Luc Pattyn22-Jul-09 10:36
sitebuilderLuc Pattyn22-Jul-09 10:36 
GeneralRe: How do I modify a class so you can convert a String to it? Pin
Gideon Engelberth22-Jul-09 12:36
Gideon Engelberth22-Jul-09 12:36 
GeneralRe: How do I modify a class so you can convert a String to it? Pin
Luc Pattyn22-Jul-09 12:49
sitebuilderLuc Pattyn22-Jul-09 12:49 
GeneralRe: How do I modify a class so you can convert a String to it? Pin
i_kant_spel22-Jul-09 15:37
i_kant_spel22-Jul-09 15:37 
GeneralRe: How do I modify a class so you can convert a String to it? Pin
Gideon Engelberth22-Jul-09 16:02
Gideon Engelberth22-Jul-09 16:02 
GeneralRe: How do I modify a class so you can convert a String to it? Pin
Gideon Engelberth22-Jul-09 15:50
Gideon Engelberth22-Jul-09 15:50 
GeneralRe: How do I modify a class so you can convert a String to it? Pin
i_kant_spel22-Jul-09 17:42
i_kant_spel22-Jul-09 17:42 
AnswerRe: How do I modify a class so you can convert a String to it? Pin
Steven J Jowett23-Jul-09 1:48
Steven J Jowett23-Jul-09 1:48 
GeneralRe: How do I modify a class so you can convert a String to it? Pin
i_kant_spel23-Jul-09 5:48
i_kant_spel23-Jul-09 5:48 
GeneralRe: How do I modify a class so you can convert a String to it? Pin
Steven J Jowett23-Jul-09 23:28
Steven J Jowett23-Jul-09 23:28 
QuestionClass Objects Accessing in different Form- Same Project Pin
Paramu197322-Jul-09 6:03
Paramu197322-Jul-09 6:03 
AnswerRe: Class Objects Accessing in different Form- Same Project Pin
Nagy Vilmos22-Jul-09 6:11
professionalNagy Vilmos22-Jul-09 6:11 
QuestionFind the active window on a computer. Pin
nolesce22-Jul-09 5:31
nolesce22-Jul-09 5:31 
AnswerRe: Find the active window on a computer. Pin
Muhammad Mazhar22-Jul-09 6:18
Muhammad Mazhar22-Jul-09 6:18 
Questionsaving data problem when using function for dataadapter and data set Pin
hemrk22-Jul-09 5:18
hemrk22-Jul-09 5:18 
AnswerRe: saving data problem when using function for dataadapter and data set Pin
DoctorMick22-Jul-09 6:20
DoctorMick22-Jul-09 6:20 
GeneralRe: saving data problem when using function for dataadapter and data set Pin
hemrk22-Jul-09 7:56
hemrk22-Jul-09 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.