Guest User

Untitled

a guest
Jul 15th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. Public Class Form1
  2. Dim author() As String
  3. Dim authors() As String
  4. Dim autNum() As String
  5. Dim editor() As String
  6. Dim translator() As String
  7. Dim publisher() As String
  8. Dim pubPlace As String
  9. Dim pubDate As Date
  10. Dim accDate As Date
  11. Dim mainTitle As String
  12. Dim subTitle As String
  13. Dim pages As String
  14. Dim volNumber As String
  15. Dim hyperlink As String
  16. Dim other As String
  17.  
  18.  
  19.  
  20. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  21. 'split author box into each person and get last name formatting
  22. If TextBox1.Text.IndexOf(";") > -1 Then 'if the name has any splits
  23. authors = TextBox1.Text.Split(";")
  24. If TextBox12.Text.Length > 0 Then 'if there are formatting options
  25. If TextBox12.Text.IndexOf(";") > -1 Then 'check if options are split
  26. autNum = TextBox12.Text.Split(";")
  27. End If
  28. End If
  29. Else 'if the name doesnt have any split
  30. If TextBox12.Text.Length > 0 Then 'if there are formatting options
  31. authors = TextBox1.Text.Split(" ")
  32. Dim lastgrp As Byte = authors.Length - TextBox12.Text 'get total number of words and subtract last name grouping
  33. Dim last As Byte = TextBox12.Text
  34. For x = 0 To lastgrp - 1 Step 1 ' loop for amount of first and middle names
  35. author(x) = authors(x) 'copy names
  36. If x = (lastgrp - 1) Then 'is this is the last loop
  37. For y = 0 To last - 1 Step 1 'loop through the last name group and combine into last name
  38. author(x + 1) = authors(x + y + 1)
  39. Next
  40. End If
  41. Next
  42.  
  43. Else
  44. author = TextBox1.Text.Split(" ")
  45. End If
  46. End If
  47. End Sub
  48.  
  49. End Class
Add Comment
Please, Sign In to add comment