Ok I have a form... on the form is two combo drop down boxes. Also there is one text box.
In the first combo box which is named: ComboBox22
The item listed in this box are the following:
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
In the second Combo box which is named: Combobox23
The items listed in this box are the following:
First Shift
Second Shift
Third Shift
The text box on the form is named: TextBox1
Also there is a RichTextBox on the form for the person to fill out.
Then there is a save button.
I currently have the save button code looking like this:
Dim dayofweek as String = CStr(Me.ComboBox22.SelectedItem)
Dim ShiftAssigned as String = CStr(Me.ComboBox23.SelectedItem)
RichTextBox1.SaveFile(String.Format("E:\", "Dayofweek", "\", "ShiftAssigned", "\", "({Textbox1}.rtf"))
Now I am very new to VB and I am not doing something right with the above code cause when I push the save button it says:
Access to the path "E:\" is denied"
Not possible as its my own drive but I know its my coding. Can somebody please show me the correct code for this.
Basicly the user needs to select a day of week from the first drop down, then select the shift from another drop down, then type in the job number they want to assign to it, then type some text for the RTF file then press save. When they press the save it should look out on drive E for the day of week folder, then the shift folder and then create a rtf file within that folder with the job number they gave it.
MAJOR BIG THANKS!!!! IN ADVANCE!!!
In the first combo box which is named: ComboBox22
The item listed in this box are the following:
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
In the second Combo box which is named: Combobox23
The items listed in this box are the following:
First Shift
Second Shift
Third Shift
The text box on the form is named: TextBox1
Also there is a RichTextBox on the form for the person to fill out.
Then there is a save button.
I currently have the save button code looking like this:
Dim dayofweek as String = CStr(Me.ComboBox22.SelectedItem)
Dim ShiftAssigned as String = CStr(Me.ComboBox23.SelectedItem)
RichTextBox1.SaveFile(String.Format("E:\", "Dayofweek", "\", "ShiftAssigned", "\", "({Textbox1}.rtf"))
Now I am very new to VB and I am not doing something right with the above code cause when I push the save button it says:
Access to the path "E:\" is denied"
Not possible as its my own drive but I know its my coding. Can somebody please show me the correct code for this.
Basicly the user needs to select a day of week from the first drop down, then select the shift from another drop down, then type in the job number they want to assign to it, then type some text for the RTF file then press save. When they press the save it should look out on drive E for the day of week folder, then the shift folder and then create a rtf file within that folder with the job number they gave it.
MAJOR BIG THANKS!!!! IN ADVANCE!!!