Click here to Skip to main content
15,881,882 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: GetCommandLineArgs() fails for long directory name? Pin
biop.codeproject15-Jun-12 21:40
biop.codeproject15-Jun-12 21:40 
Questionhow to create advanced browser like firefox with visual basic 2010? Pin
JOHNSAMI13-Jun-12 16:19
JOHNSAMI13-Jun-12 16:19 
AnswerRe: how to create advanced browser like firefox with visual basic 2010? Pin
Dave Kreskowiak13-Jun-12 18:22
mveDave Kreskowiak13-Jun-12 18:22 
Questionvb .net - Moving to a new computer Pin
No-e13-Jun-12 8:02
No-e13-Jun-12 8:02 
AnswerRe: vb .net - Moving to a new computer Pin
Dave Kreskowiak13-Jun-12 8:12
mveDave Kreskowiak13-Jun-12 8:12 
GeneralRe: vb .net - Moving to a new computer Pin
No-e13-Jun-12 9:48
No-e13-Jun-12 9:48 
GeneralRe: vb .net - Moving to a new computer Pin
Richard MacCutchan13-Jun-12 22:46
mveRichard MacCutchan13-Jun-12 22:46 
QuestionHow to Print this array in word?(VBA) Pin
godevg12-Jun-12 21:23
godevg12-Jun-12 21:23 
Hi all

I have a two Input data of Year and Name in separate two arrays. I need to sort both the array values first i need to sort it chronologically(Year) and then if year information repeats it will sort the Array Alphabetically.

As for as i complete the sorting for both year and then name. Using Wordbasic.sortarray command

Input: (Before sorting)

SDF 1997
ELS 1986
PJK 1983
WKL 1995
EFD 1986


Output: (After sorting)

PJK 1983
EFD 1986
ELS 1986
WKL 1995
SDF 1997

if i print it in word it printed like this:


PJK 1983, ELS 1986, EFD 1986, WKL 1995, SDF 1997.

Here is my code for Printing the data. Would anyone please look into this and guide me where did i made mistake?

WordBasic.sortarray SortyearArray()

Dim I As Integer
Dim J As Integer
Dim K As Integer
Dim N As Integer
Dim Counter As Integer '
COUNTER1 = 1


i1 = 1
J1 = 5

For I = 0 To UBound(SortyearArray())
Counter = 1
For J = I + 1 To UBound(SortyearArray())
If SortyearArray(I) = SortyearArray(J) Then
Counter = Counter + 1
MsgBox (Counter)
End If
COUNTER1 = Counter + COUNTER1
Next J
If Counter = 1 Then
For N = i1 To J1
If SortyearArray(I) = Year(N) Then
Selection.TypeText Text:="(" & AuthorName(N) & Year(N) & ")"
End If
Next N
End If
Next I
Anyone please guide me to complete this.
Dk.G

AnswerRe: How to Print this array in word?(VBA) Pin
Andy_L_J12-Jun-12 21:57
Andy_L_J12-Jun-12 21:57 
QuestionLimit picture size in picture box Pin
Midnight Ahri10-Jun-12 22:51
Midnight Ahri10-Jun-12 22:51 
AnswerRe: Limit picture size in picture box Pin
Eddy Vluggen11-Jun-12 0:09
professionalEddy Vluggen11-Jun-12 0:09 
QuestionVB.NET : Datagrid's scrolling giving error after selecting row Pin
Nitin Varshneya8-Jun-12 5:02
Nitin Varshneya8-Jun-12 5:02 
AnswerRe: VB.NET : Datagrid's scrolling giving error after selecting row Pin
Dave Kreskowiak8-Jun-12 10:07
mveDave Kreskowiak8-Jun-12 10:07 
QuestionHow do you right align using .ToString() Pin
David Mujica7-Jun-12 9:24
David Mujica7-Jun-12 9:24 
AnswerRe: How do you right align using .ToString() Pin
Luc Pattyn7-Jun-12 9:41
sitebuilderLuc Pattyn7-Jun-12 9:41 
GeneralRe: How do you right align using .ToString() Pin
David Mujica7-Jun-12 10:07
David Mujica7-Jun-12 10:07 
AnswerRe: How do you right align using .ToString() Pin
Alan N7-Jun-12 9:53
Alan N7-Jun-12 9:53 
GeneralRe: How do you right align using .ToString() Pin
MicroVirus8-Jun-12 10:47
MicroVirus8-Jun-12 10:47 
AnswerRe: How do you right align using .ToString() Pin
908236518-Jun-12 6:41
908236518-Jun-12 6:41 
QuestionDocument Viewer Pin
D. Joe6-Jun-12 16:30
D. Joe6-Jun-12 16:30 
AnswerRe: Document Viewer Pin
Dave Kreskowiak7-Jun-12 4:49
mveDave Kreskowiak7-Jun-12 4:49 
Questionfile not found: cs2.exe Pin
rizaky20115-Jun-12 19:12
rizaky20115-Jun-12 19:12 
AnswerRe: file not found: cs2.exe Pin
Richard MacCutchan5-Jun-12 21:13
mveRichard MacCutchan5-Jun-12 21:13 
GeneralRe: file not found: cs2.exe Pin
rizaky20117-Jun-12 16:54
rizaky20117-Jun-12 16:54 
GeneralRe: file not found: cs2.exe Pin
Richard MacCutchan7-Jun-12 21:44
mveRichard MacCutchan7-Jun-12 21:44 

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.