Hi All
I have this list where I create new claims. Every time I enter a new claim it makes a new row and the last one moves down the list, and the lastest is on top. Now I would like to have some "status" drop down list on each of the claims. These have to when I create the new claim, so it has to be with in my current "rookie code".
It only needs to be 2-3 choices, probably only 2 "In progress" and "Completed". The list needs to be on G8, H8 and I8.
The last part is just where it creates a folder with claim number and year.
I know my code is really not that good, but I´m really a rookie and I´m learning slowly.
Hope someone can help, or let me know if it doesn´t make sense.
I have this list where I create new claims. Every time I enter a new claim it makes a new row and the last one moves down the list, and the lastest is on top. Now I would like to have some "status" drop down list on each of the claims. These have to when I create the new claim, so it has to be with in my current "rookie code".
It only needs to be 2-3 choices, probably only 2 "In progress" and "Completed". The list needs to be on G8, H8 and I8.
The last part is just where it creates a folder with claim number and year.
I know my code is really not that good, but I´m really a rookie and I´m learning slowly.
Hope someone can help, or let me know if it doesn´t make sense.
VBA Code:
Private Sub addProject_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Ark1")
Sheets("Ark1").Range("A8").Select
ActiveCell.EntireRow.Insert shift:=xlDown
Sheets("Ark1").Range("B8:J8").Select
Selection.Borders.Weight = xlThin
Sheets("Ark1").Range("B8:J8").Select
Selection.Font.Size = 11
Sheets("Ark1").Range("B8:J8").Select
Selection.Font.Bold = False
Sheets("Ark1").Range("D8").Select
ActiveCell.Value = Date
With ws
Sheets("Ark1").Range("B8").Select
ActiveCell.Value = Me.TextBox1.Value
Sheets("Ark1").Range("C8").Select
ActiveCell.Value = Me.TextBox2.Value
Sheets("Ark1").Range("E8").Select
ActiveCell.Value = Me.TextBox3.Value
Sheets("Ark1").Range("F8").Select
ActiveCell.Value = Me.TextBox4.Value
End With
'clear the data
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
Me.TextBox1.SetFocus
Dim wb As Workbook
Dim p As String, NwPath As String
Dim c1 As String, c2 As String
Dim folder As String
Set wb = ThisWorkbook
p = wb.Path & "\"
Set ws = wb.Sheets("Ark1")
With ws
c1 = .Range("B3").Value
c2 = .Range("B8").Value
End With
NwPath = p & c2 & "_" & c1
'check if folder exists, if not then create folder
folder = Dir(NwPath, vbDirectory)
If folder = vbNullString Then
VBA.FileSystem.MkDir (NwPath)
End If
Unload Me
End Sub