Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim author() As String
- Dim authors() As String
- Dim autNum() As String
- Dim editor() As String
- Dim translator() As String
- Dim publisher() As String
- Dim pubPlace As String
- Dim pubDate As Date
- Dim accDate As Date
- Dim mainTitle As String
- Dim subTitle As String
- Dim pages As String
- Dim volNumber As String
- Dim hyperlink As String
- Dim other As String
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- 'split author box into each person and get last name formatting
- If TextBox1.Text.IndexOf(";") > -1 Then 'if the name has any splits
- authors = TextBox1.Text.Split(";")
- If TextBox12.Text.Length > 0 Then 'if there are formatting options
- If TextBox12.Text.IndexOf(";") > -1 Then 'check if options are split
- autNum = TextBox12.Text.Split(";")
- End If
- End If
- Else 'if the name doesnt have any split
- If TextBox12.Text.Length > 0 Then 'if there are formatting options
- authors = TextBox1.Text.Split(" ")
- Dim lastgrp As Byte = authors.Length - TextBox12.Text 'get total number of words and subtract last name grouping
- Dim last As Byte = TextBox12.Text
- For x = 0 To lastgrp - 1 Step 1 ' loop for amount of first and middle names
- author(x) = authors(x) 'copy names
- If x = (lastgrp - 1) Then 'is this is the last loop
- For y = 0 To last - 1 Step 1 'loop through the last name group and combine into last name
- author(x + 1) = authors(x + y + 1)
- Next
- End If
- Next
- Else
- author = TextBox1.Text.Split(" ")
- End If
- End If
- End Sub
- End Class
Add Comment
Please, Sign In to add comment