I am having an issue with padding and coding. Still early on in my visual basic understanding so please go easy on me.
I am trying to get text to line up in columns of a few array variables and am having a few issues. First this code below is throwing an error Whenever I go to run it stating: "Object reference not set to an instance of an object." A few other questions though, are why I can not pad my integer and if I wanted to display my integer depending on a checkbox, how would I need to work that code so that I don't put an If statement that would end up stating everything below followed by an else that contains all but the integer statement below? I hope these questions make sense, other than this part I think I'm in good shape.
txtList.Text &= intA(intForm) _
& strA(intForm).PadRight(15) _
& strB(intForm).PadRight(30) _
& strC(intForm).PadRight(45) _
& strD(intForm).PadRight(60) _
& strE(intForm).PadRight(76) _
& ControlChars.NewLine
I am trying to get text to line up in columns of a few array variables and am having a few issues. First this code below is throwing an error Whenever I go to run it stating: "Object reference not set to an instance of an object." A few other questions though, are why I can not pad my integer and if I wanted to display my integer depending on a checkbox, how would I need to work that code so that I don't put an If statement that would end up stating everything below followed by an else that contains all but the integer statement below? I hope these questions make sense, other than this part I think I'm in good shape.
txtList.Text &= intA(intForm) _
& strA(intForm).PadRight(15) _
& strB(intForm).PadRight(30) _
& strC(intForm).PadRight(45) _
& strD(intForm).PadRight(60) _
& strE(intForm).PadRight(76) _
& ControlChars.NewLine