Click here to Skip to main content
15,897,519 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHelp with saving Printdocument data to a file Pin
vbbeg9-Feb-07 8:17
vbbeg9-Feb-07 8:17 
AnswerRe: Help with saving Printdocument data to a file Pin
Dave Kreskowiak10-Feb-07 4:26
mveDave Kreskowiak10-Feb-07 4:26 
GeneralRe: Help with saving Printdocument data to a file Pin
vbbeg10-Feb-07 4:50
vbbeg10-Feb-07 4:50 
GeneralRe: Help with saving Printdocument data to a file Pin
Dave Kreskowiak10-Feb-07 4:59
mveDave Kreskowiak10-Feb-07 4:59 
GeneralRe: Help with saving Printdocument data to a file Pin
vbbeg10-Feb-07 5:04
vbbeg10-Feb-07 5:04 
GeneralRe: Help with saving Printdocument data to a file Pin
Dave Kreskowiak10-Feb-07 5:11
mveDave Kreskowiak10-Feb-07 5:11 
QuestionIterate through Array Pin
Larry White9-Feb-07 7:27
Larry White9-Feb-07 7:27 
AnswerRe: Iterate through Array Pin
Dave Kreskowiak9-Feb-07 7:38
mveDave Kreskowiak9-Feb-07 7:38 
Larry White wrote:
After modifying line 3 with x = CStr(arrList2.Item(i)) , I receive the following error: "Value of type 'String' cannot be converted to '1-dimensional array of String'." X is defined as: Dim x() As String


It's always best to copy and paste the actual code you're using. Don't post a sample and then tell use what you did to it. It makes it very difficult to see what you actually did.

x doesn't have an Item property, so the code should look more like this:
For i = 0 To x.GetUpperBound(0)
    Console.WriteLine(x(i))
Next i

Notice, you don't need CSTR. This is because your x array is an array of Strings. Why try to convert a String to a String??

Also, to get your code to show up in the nice beige box and retain some formatting, paste it between <pre> and </pre> tags.


Dave Kreskowiak
Microsoft MVP - Visual Basic


GeneralRe: Iterate through Array Pin
Larry White9-Feb-07 8:01
Larry White9-Feb-07 8:01 
AnswerRe: Iterate through Array Pin
Guffa9-Feb-07 7:39
Guffa9-Feb-07 7:39 
GeneralRe: Iterate through Array Pin
Larry White9-Feb-07 8:35
Larry White9-Feb-07 8:35 
AnswerRe: Iterate through Array Pin
Guffa10-Feb-07 3:57
Guffa10-Feb-07 3:57 
GeneralRe: Iterate through Array Pin
Larry White12-Feb-07 4:33
Larry White12-Feb-07 4:33 
AnswerRe: Iterate through Array Pin
Guffa12-Feb-07 4:57
Guffa12-Feb-07 4:57 
GeneralRe: Iterate through Array Pin
Larry White12-Feb-07 5:21
Larry White12-Feb-07 5:21 
AnswerRe: Iterate through Array Pin
Guffa13-Feb-07 11:34
Guffa13-Feb-07 11:34 
GeneralRe: Iterate through Array Pin
Larry White15-Feb-07 4:29
Larry White15-Feb-07 4:29 
QuestionXML Serialisation Pin
Sebastian T Xavier9-Feb-07 6:45
Sebastian T Xavier9-Feb-07 6:45 
AnswerRe: XML Serialisation Pin
TwoFaced9-Feb-07 17:26
TwoFaced9-Feb-07 17:26 
GeneralRe: XML Serialisation Pin
Sebastian T Xavier11-Feb-07 23:26
Sebastian T Xavier11-Feb-07 23:26 
Questionopen sound file button Pin
comicsuperfan19-Feb-07 5:26
comicsuperfan19-Feb-07 5:26 
QuestionReconnaître un répertoire en lecture seul Pin
prady929-Feb-07 4:23
prady929-Feb-07 4:23 
AnswerRe: Reconnaître un répertoire en lecture seul Pin
Dave Kreskowiak9-Feb-07 5:24
mveDave Kreskowiak9-Feb-07 5:24 
AnswerRe: Reconna&amp;#238;tre un r&amp;#233;pertoire en lecture seul Pin
Garth J Lancaster9-Feb-07 13:29
professionalGarth J Lancaster9-Feb-07 13:29 
QuestionData Report of vb 6 Not refresh help required Pin
amjad ali shah9-Feb-07 3:06
amjad ali shah9-Feb-07 3:06 

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.