Multiple Text Box Entries On Form To Array
Can anyone help. I have multiple text boxes on a form, and I want the code to go through each text box and put the text in to a 2D array.
The text boxes are created after the user input the number of verticies, 2 verticies creates 4 text boxes done with this code
Private Sub Form_Load() Dim ctlName As Control Dim TBox_name As String Dim Tbox_value As String Dim i As Integer Dim Top As Integer i = 0 Top = 500 TBox_name = "Text" For i = 0 To Verticies - 1 Tbox_value = CSng(i + 1) TBox_name = TBox_name + Tbox_value Set ctlName = Form4.Controls.Add("VB.TextBox", TBox_name, Form4) ctlName.Visible = True ctlName.Top = Top * (i + 1) ctlName.Left = 500 ctlName.Width = 700 ctlName.Height = 200 Tbox_value = CSng(i + 2) TBox_name = TBox_name + Tbox_value Set ctlName = Form4.Controls.Add("VB.TextBox", TBox_name, Form4) ctlName.Visible = True ctlName.Top = Top * (i + 1) ctlName.Left = 1700 ctlName.Width = 700 ctlName.Height = 200 Next Form4.Height = (Top * (i + 1)) + 500 End Sub
Thanks for your help.
Iain
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Eliminate Multiple Entries An An Array
I have an array as follows :
a(0) = "f"
a(1) = "a"
a(2) = "b"
a(3) = "c"
a(4) = "a"
a(5) = "b"
a(6) = "d" etc The size of the array is appr 70000
Many values are repeats ( a and b ) in the above sample.
How can I create an array which would contain only
f,a ( but only once ) b ( only once ) c and d
Thanks
Multiple Entries In 1 Text Box
I need help doing something with a text box. Heres the situation... I have a command that brings a text box visible to the form. I then want the user to input say "5" into the text box... and then hit a command that says add which takes that number to a label called total... then if the user has another number to put into the text box, the first one entry deletes after the add command is pushed and the user can put another entry in the same text box. Say the number is "4", then the add command is pushed again deleting the "4" and adding it to the 5 previously in the label. Can somebody help me with pseudo code?
Putting Text File Entries Into An Array
Hey all!
OK, what I want to do is put a whole bunch of names into an array from a text file. The names are already in correct order, all I want to do is get entry #1 into label #1, entry #2 into label #2 etc. How do I do this?
This is what I've got, but I know it doesn't work.
Code:
Private Sub Form_Load()
Dim Name as String, i as String
Open "c:lennycollingwoodfilesPlayers.txt" For Output As #1
For i = 1 To 52
Input #1, Name
lblPlayer(i).Caption = Name
Name = ""
Next i
End Sub
Thanks in advance for any help you can offer.
Help On Displaying Certain Text As A Label In A Form Based On All Entries In Status Field
I have a ExamTaken Table that has the following fields:
1. ExamID as Primary Key
2. ExamDate
3. Score
4. Status. The status field has a combo box that gives two choices Pass or Fail. The status field actually stores an ID which is ID="5" for Pass
and ID = "4" for Fail.
My Question. I have a form that displays all exam ID, the score, date and status. I have a Lable named lable13 at the top of the Form that displays a text msg "Overall Result: "
What I need to do is, if all the status in the status field is Pass then Me.Label13.Caption = "Overall Result: Passed" and If any of the status field is set to Fail then the Me.Label13.Caption = "Overall Result: Failed"
So if there are 6 exam ID and the status field for each ID is selected as Pass then the Label13 should display "Overall Result: Passed" however if any of the status field is selected as Fail for any exam ID then the label13 should display "Overall Result: Failed"
I have included a sample database to give a better understanding on what I am trying to achieve.
Thanks for all you response,
Ket
VB To Check For Entries/not Entries On A Form
Helooo
I've been writing a reporting tool in Excel. I have hit upon a problem though. One part of the tool is a form users fill in to log system faults at work. Unfortunatley, if they leave a field blank, it buggers up the way the tool works later in the report.
I need to have a Sub that can look at each of the 5 cells, and either fill them in with something like "Not-set" or bring up a message box and stop the macro, so the user can fill it in.
Below is the code I'm trying to use.....
The problem is, once the code reaches the 'Call saveandupdate' command, the next Sub starts, and if there is more than one blank field, it is ignored....
Can anyone help, or suggest an alternative?
Thankus Muchus.
Chris~
Code:
Function validateCell(celladdress As String) As Boolean
If IsEmpty(Range(celladdress).Value) Then
validateCell = False
Else
validateCell = True
End If
End Function
Sub validateAll()
Const issue = "E12"
Const custnum = "F12"
Const Timedate = "G12"
Const ISP = "H12"
Const IP = "E17"
Const Notes = "F17"
Dim valid As Boolean
initialise:
valid = True
If Not validateCell(issue) Then
valid = False
Range("issue").Select
ActiveCell.Formula = "Not set"
End If
If (valid = True) And (Not validateCell(custnum)) Then
valid = False
Range("F12").Select
ActiveCell.Formula = "Not set"
End If
If (valid = True) And Not validateCell(Timedate) Then
valid = False
Range("G12").Select
ActiveCell.Formula = "Not set"
End If
If (valid = True) And Not validateCell(ISP) Then
valid = False
Range("H12").Select
ActiveCell.Formula = "Not set"
End If
If (valid = True) And Not validateCell(IP) Then
valid = False
Range("E17").Select
ActiveCell.Formula = "Not set"
End If
If (valid = True) And (Not validateCell(Notes)) Then
valid = False
Range("F17").Select
ActiveCell.Formula = "Not set"
End If
' Call SaveandUpdate
End Sub
Multiple Form Use Of An Array
I have two forms, the first reads a file and loads an array, the second is used to add to the array. I've tried everything I know to access the array in the second form with no success. I was told if I used the right scope it can be done. I declared the array as public, but no luck.
Multiple Entries Into Workbook
I have multiple workbooks writing to a single excel workbook. There will be instances where 2+ people attempt to write and save to the same cell. At the moment I have set it up so that when the single book is saved if it is read only (someone else has it opened) it will give an error (because it is read only) it then pauses for between 0-2 seconds, opens the single book again and writes to the next available cell.
Should i be looking into sharing the single workbook?
If so where can i find a good guide on conflict resolution.
Any thoughts would be appreciated.
Using Modules With Multiple Entries
hi
I'm a complete novice, so I hope my question is worded vlear enough....
I'm wondering exactly how to get multiple objects inside a class module and refer back to them later.
This data will be read from a disk before being put into the class list in the form IDnumber, firstname, and lastname for each student on the list.
I have heaps of examples of one object within the class eg one student with the above details but how do I add a second and subsequent students to this list?
And how do I then, say, store 1 value from all of them eg their ID number to a combo box and refer back to the rest of the information on the student when their ID is selected?
Thanks for any help you can give.... I'm hitting my head against the wall for answers
AO
Delete Multiple Entries
I need to delete old entries from a SQL table where the PhoneNumberID value is the same as a newer entry. So if there were 3 entries in the table that had PhoneNumberID as 1009, the oldest entries would be deleted, and only the newest one kept.
The AssignDate field is where the date value is stored, but I can't come up with the query.
Code:
DELETE FROM [Calls] WHERE [PhoneNumberID] = ??This is where I'm stuck
SQL isn't my strong suit. Could anyone help me out?
Viewing Multiple Entries From A DB
Hi,
I would like to view multiple entries from a database simultaniously. I have would like to view up to 20 entries with four fields each at one time. I know that I could simply add many more fields and then just have my display textboxes linked to those different fields, but there must be a easier way. Any help is appreciated.
How To Break Any Rich Textbox Text Into Multiple Array
I want to jump on the second form that has txtstreet, txtcity two text box
On form one I has a address text box I want when I press enter key on address text box on form 1 then this value go into form2 street textbox and next into state textbox
Split function not working see my coding
VB Code:
Private Sub CAddress_Click()Dim SNames() As StringDim N As IntegerIf Txtaddress(0).Visible = True ThenSNames = Split(Txtaddress(0).Text) Else If Txtaddress(1).Visible = True Then SNames = Split(Txtaddress(1).Text) Else SNames = Split(Txtaddress(2).Text) End IfEnd If Select Case UBound(SNames) Case 0 'One name only (put it in surname?): F_Address_Detail.TxtStreet.Text = SNames(0) Case 1 'Two names (first/last?) F_Address_Detail.TxtStreet.Text = SNames(0) F_Address_Detail.TxtCity.Text = SNames(1) Case Is > 1 'Three or more names (put all the last ones in the lastname textbox?) F_Address_Detail.TxtStreet.Text = SNames(0) F_Address_Detail.TxtCity.Text = SNames(1) For N = 2 To UBound(SNames) F_Address_Detail.TxtState.Text = F_Address_Detail.TxtState.Text & SNames(N) & IIf(N = UBound(SNames), vbNullString, "") 'F_Full_Name.Txtlast.Text = F_Full_Name.Txtlast.Text & SNames(N) & IIf(N = UBound(SNames), vbNullString, "") Next NEnd Select F_Address_Add.Enabled = FalseF_Address_Detail.ShowEnd Sub
Search And Replace Multiple Entries
Can anyone help with the following problem?
I'm trying to standardise various country names found in a column of data.
At the moment I'm reduced to using the following cumbersome code for - in this example - converting USA and United States of America to United States:
sub replace()
Columns("P:P").Select
Selection.Replace What:="USA", Replacement:="United States"
Selection.Replace What:="United States of America", _ Replacement:="United States"
End Sub
Is there a way of not repeating every line for every replacement word? I've tried using OR but the syntax is wrong. It will obviously work doing it this way but I can't imagine it's very efficient.
Any ideas...???
thanks
Lookup Multiple Identical Entries
One column contains coding that relates to various vendors. Another column has dollar sums relating to the same vendors. I want to sum the totals from each vendor by adding the totals pertaining to each code. I assume there is a way to loop a lookup function, but I am not sure if that is the smartest way, nor do I know how to do it.
Any help?
Catching Multiple Entries In Access
My VB program connects to an access database. This code takes a .csv file and imports it into the database (I found the first method in this forum). The function that I wrote is my problem. It is suppose to check to see if a value is allready in the table. It works for some values but not others. I am thinking that there might be a better way to check this, mabye an access error handler for primary key constraints.
Code:
Private Sub importCSV(filename As String)
Set Con = New ADODB.Connection
Set rs = New ADODB.Recordset
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" + gStrDb + ";"
sSQL = "select * from Package"
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.CursorType = adOpenKeyset
rs.Open sSQL, Con
Open filename For Input As #1
intInput = 0
Do Until EOF(1)
Line Input #1, strL
strF = Split(strL, ",")
If Not multIndex(strF(0)) Then
intInput = intInput + 1
rs.AddNew
rs!trackingNum = strF(0)
rs!dateShip = CDate(strF(1))
rs.Update
End If
Loop
Close #1
rs.Close
Con.Close
End Sub
Private Function multIndex(str As String) As Boolean
'this function checks to see if a record has been entered
Dim bol As Boolean: bol = False
If Not rs.EOF Then
rs.MoveFirst
counter = 0
Do While Not rs.EOF
strRsIndex(counter) = rs!trackingNum
rs.MoveNext
counter = counter + 1
Loop
Dim I As Integer
For I = 0 To counter
If str = strRsIndex(I) Then
bol = True
End If
Next
End If
multIndex = bol
End Function
Multiple Database And Email Entries
Hi
I have a little problem that you may be able to help on......
I have just re-coded my website to do the following :
Take user details via a form >> Submit them to a DB update page >> This then submits to an email creation page >> this then goes to a "Thank you for your booking" page.
All this works fine until the website visitor clicks their browsers back button.
If they click back once it sends me another email
If they click back twice it posts to the database again and then sends me another email.
Therefore at the moment I am getting 5-6 emails for each form/booking submission from the website.
I have been trying to find info about resetting all variables when it reaches the last page, closing and re-opening the browser (probably bad idea) or disabling the back button !!
Any ideas on what I can do to get round this problem ??
Cheers for any help/ideas.
Giles
Multiple Entries In Components Manager
Has anyone experienced this problem before?
I have the same control that now has 10 entries in the components manager. The big problem is that I work on the project from two computers and they don't recognise that it is the same control and when I load the project I get errors and the controls of that type are either deleted or converted to picture boxes.
I've tried a suggestion by MarkT to use regclean but it didn't work. Anyone else have any idea to the cause and how to resolve it?
I have the .ocx file located in the same location on the two computers.
C:windowssystem32.
Finding Multiple Entries In Textbox
Hi everyone ...
Just a test project for me to learn on. I am trying to loop through a textbox, finding each instance of a letter entered into a second textbox. I can get the loop to work, but I am stumped on the output. I want it to change a labels caption to " the search string was found at positions:
1
3
5
etc.
If I step through the code it does show each instance of the found string but it only shows one, not all. also if the string being searched does NOT end with the letter(s) I am trying to find, then it ends up showing "search not found"
Here is my code so far
Code:
Private Sub Command1_Click()
Dim sInput As String, sFind As String
Dim iFound As Integer
Dim iCounter As Integer
sInput = Text1
sFind = Text2
For iCounter = 1 To Len(sInput)
iFound = InStr(iCounter, sInput, sFind, vbTextCompare)
If iCounter = 1 And iFound = 0 Then
Label1.Caption = "Search not found"
Exit Sub
Else
Label1.Caption = "The search string was found at Position :" & iFound
End If
Next iCounter
End Sub
Also, if someone has a "cleaner" way of writing this, please provide it so i can try to learn more.
Thanks
Michael
Multiple Line ListBox Entries
I was wondering if it is possible to have ListBox entries that take up more than one line, and if so, what would be the easiest way to do this. Any suggestions would be appreciated!
-Thanks,
Yguy123
Generate Multiple Entries To Table
I am using the following code to generate a serial# on a form. What I have been asked to do now is to try and see if I can add a qty field to the form and for whatever amount (say 50) is entered, create that many serial#'s....can this be done? Here is the code I am currently using...thanks
Private Sub Command11_Click()
Dim MyDate, MyYear, MyWeek, MyDay, MyNumber As Integer
Dim Ret As String
Dim Test As Variant
MyDate = Date
MyYear = Format(Date, "yy")
MyWeek = Format(DatePart("ww", MyDate, vbUseSystemDayOfWeek, vbUseSystem), "00")
MyDay = Format(DatePart("w", MyDate, vbUseSystemDayOfWeek, vbUseSystem), "0")
Ret = "V" & MyYear & MyWeek & " " & MyDay
Test = DMax("[number]", "TABLE1", "number like '" & Ret & "*'")
If IsNull(Test) Then
Ret = Ret & " 001"
Else
MyNumber = CInt(Right(Test, 3)) + 1
Select Case MyNumber
Case Is < 10
Ret = Ret & " 00" & CStr(MyNumber)
Case Is < 100
Ret = Ret & " 0" & CStr(MyNumber)
Case Else
Ret = Ret & " " & CStr(MyNumber)
End Select
End If
Forms!Form1!Serial = Ret
End Sub
Which Is The Best Grid Option For Multiple Entries
hi friends i want to know that which is the best option for multiple entries at a time like msflexgrid which we can use it by moving text box but it is quite complicated and time consuming any other option any one can give, which is very flexible And also with all common events, waiting for replies
Saving Multiple Combo Box Entries To File
Hello, for the past little while, i've been trying to save my combo box entried to a file so that the next time I run my program the entries will still be there. Should I use a combo box or listbox? How do I go about reading/writing multiple entries from a combo box?
My scenario is a program for a restaurant, the users will all be added into the computer, which then their names will be displayed in a combo box. I don't wanna keep adding the same users everytime my programs starts. I want my program to read a file and automotically input them into the combo box..
your help will be greatly appreciated,,
thanks
I Get A Multiple Entries In Control Panel When Installing
As the title says, whenever I make a new version of a program I made, and install it, I get like "App name", "App name #1", "App name #2" etc... since I did not check that before I have like 8 of them... the program overrides the previous exe file, so that is only one, but I have 8 uninstall logs, and 8 entries in Control Pannel's Add/Remove programs...
I use "Package & Deployment Wizard" to make the setup...
So... my question is: How can I make the setup override the previous one, and have only one entry in Add/Remove programs ?
Package && Deployment Wiz / Multiple Uninstall Entries
Using the VB 6 (SP 4) P&D Wizard to create a setup. Inoticed that if you run the setup multiple times (without uninstalling the app first) you will get multiple entries in the Add/Remove Applications control panel applet. It looks something like this:
XYZ App
XYZ App (C:Program FilesXYZ App)
XYZ App (C:Program FilesXYZ App)
...etc. for as many times as you run the setup...
Has anyone encountered this, and more importantly how to prevent it from happening...
Thanks,
Drag && Drop Multiple List Entries
When a listbox's Multiselect property is set to Extended how do you drag multiple items? If you start moving with the mouse button down, you just select more entries.
Reading Multiple Entries From A Single Textbox??
ive got a simple project to complete for programming 101, and it just isnt working out for me.
thats the basic idea of the assignment.
i have to enter multiple numbers seperated by a space, and using the input, to determine the largest/second largest numbers accompanied by the number of occurances.
all to be done without using arrays.
i know that there is alot of VB veterans on here, and im hoping someone will be able to help me out.
Edited by - AddyC on 12/1/2003 5:35:03 PM
Stopping Multiple Entries From Appearing In A Combo Box????
Hi all,
I am trying to get a combo box to display entries from an access database. I have gotten it to display the field I want but it displays the name multiple times. What I have is a prgram that writes exceptions to a database. I then have a program(the one in question) to view the entries in the database and once viewed store them but do not view them again. So the problem that I am encountering is that when a user enters multiple entries to the database it will list thier name once for each entry. I just want it to display thier name once letting me know that they have made an entry to the database not how many time they have. Is there someway to search the database just to get the name from this field only once instead of every occurence of it in this field? If so can you please give me some sample code so I can see how it works then I can adjust mine to work. thank you for all the help in advance. Here is some of the code to get an Idea of what i am trying to do.
Code:
Private Sub cmbMan_Click(Index As Integer)
If cmbMan(0).Text = rSOne.Fields("manager") Then
rSOne.MoveFirst
Do Until rSOne.EOF = True
If IsNull(rSOne.Fields("Employee")) Then
rSOne.Fields("Employee") = ""
Else
cmbEmp(1).AddItem rSOne.Fields("Employee")
End If
rSOne.MoveNext
Loop
rSOne.MoveFirst
Else
MsgBox "You have no exceptions at this time. Please select another name or Try again at a later time. Thank you!!"
cmbEmp(1).Text = ""
End If
End Sub
How To Write A Query To Select Multiple Entries
Hi Techies,
First i will explain u the criteria. Assume a table with 6 rows and 4 columns. Each and every cell is having a text box whose value is going to be fetched from the backend database.(SQL Server). Simillaryly the data's enter/modified here should go to the backend.
Now my question is "Do i have to write individual query to fetch/update data's for all the cells or is there is any other way to do". It involves fields from Multiple tables
Please assume that the tables are EMP,DEPT, EMPSAL
Looking forward your help in this regards
Thanks,
Karthik
Array With No Entries
I set up an array like:
DIM MyArray() as string
In the program I may or may not REDIM and load the array.
If OK then
REDIM PRESERVE MyArray(0 to entries)
MyArray = Str$(entries)
entries = entries + 1
End If
The problem is when the array has never been REDIM'd.
When I try to access the array, the program stops with Subsript out of range.
When I check the value of MyArray while stepping through the program,
it shows a value of Nothing. How can I test for Nothing?
If MyArray <> Nothing then '<<<<<< This does not work
For i = 0 to Ubound(MyArray)
List1.Additem MyArray(i)
Next i
End If
Thanks
jim
.... .. .... ..
How Many Entries In An Array
This is another easy one...and yes, I looked around in help and searched these archives but nothing obvious.
So, I'm embarrassed to ask but...
How do you know how many entries there are in an array?
Removing Duplicates For Multiple Entries In A Data Validation
Dear All,
I have a list that can allow multiple entries to be entered on a separate line within a cell. But i want to make sure that once an entry has been entered, it will not allow the similar one to be entered again the the same cell.
i tried hiding but it only works if i have the values in different rows.
Anyone has any idea how i can avoid duplicate entries with this?
i have attached the file.
Many help is appreciated.
Book1.zip
Count Entries In Array
array(0) = "aaa"
array(1) = "bbb"
array(2) = "ccc"
array(3) = "ddd"
array(4) = "eee"
array(5) = "fff"
What I want to return is the number 6 -- how many 'additions' to the array() variable.
I hope that made sense. Help is appreciated
Deleting Entries In An Array
Hi,
I want to be able to delete specific entries from my arrray, after I select them from a combobox, has anybody got any suggestions on how to?
Code for the combobox:
------------
Private Sub Combo1_Click()
txtID.Text = uStudent(Combo1.ListIndex + 1).ID
txtFirst.Text = uStudent(Combo1.ListIndex + 1).Firstname
txtLast.Text = uStudent(Combo1.ListIndex + 1).Surname
txtForm.Text = uStudent(Combo1.ListIndex + 1).Form
txtNo.Text = uStudent(Combo1.ListIndex + 1).EntryNo
txtLetters.Text = uStudent(Combo1.ListIndex + 1).Letters
txtWeeks.Text = uStudent(Combo1.ListIndex + 1).Weeks
End Sub
-------------
Cheers
Combobox Entries....Array?
A bit harder one:
2.) I've simplifed my program down to make it easier to use and less flashy. Anyway, I had 5 command buttons that when clicked would populate info into a listview from a file. I have converted this to a Comobox, and want to allow the user to add as many entries (categories) to the combobox as they want. Then When they select the one they want from the combobox, I will populate the listview from a table in a db that is associated with that selection. The question is how to store this info. I was going to use an array to add to the combobox, but there will never be a set # of selections to choose from. Also, how should I store which table is associated with each selection? Let me know if I need to clarify this anymore. Any help is appreciated.
-Jeremy
Counting The Number Entries In Array
I have a program that recieves commands via Winsock and splits the commands up into the parts using the spilt command.
arrCommand() = split(arrData, " ")
that works fine and makes the correct array with the corresponding parts of the commands. But because the commands I have made can be both 3 parts long and 2 parts long, the:
Case arrCommand(3)
Gives error because arrCommand(3) doesnt exist on a 2 part command.
Is there a way/code to give the number of entries in the array?
How Can You Randomize The Entries In A String Array?
I have an array of 10 items..
array(0 to 9) =
a,b,c,d,e,f,g,h,i,j
How can I randomize the list so it becomes something like..
array (0 to 9) =
g,h,j,a,c,d,e,b,f,i
Anyone know?
Remove Identical Array Entries
I know, I know - there is a hundred billion ways of doing it. I just have that "thinking sucks" syndrome again. Does any one have an effective code for this task? I have a string array with lotsa same stringies and they have to die!
Saving Multiple Master-detail Entries On Single Save Button Press
i have a master detail form :
1. i m showing master items in a flexgrid named as fgMaster
2. i m showing detail items in another flexgrid named as fgdetail
problem is that when i select a single item from master grid first i have to generate a series of some user defined target like genrate 10 unique detail codes against tht seleted item then i enter different values against that item. i didn't press save button yet, user select another item from fgmaster and generate another series of unique codes and enter different values aginst that item.
i have to store all these inforation and at last when user press Save button i have to enter all those entries item wise.
i m facing difficulties to store and retrieve these information before saving..
ur immediately reply would be very helpful to me
thnks to every body
Search Form With Multiple Text Boxes
I'm making a form for the user to search from several (6) different criteria. Depending on how much info the user enters will determine my sql where clause. I've done this in the past with few text boxes (3), but 6 is going to be a lot of typing unless there is a better way than the way I have done this in the past.
Here's how I've done it in the past.
In the tag of each control I assign an integer that would be the binary equivalent. Sor for my 5 text boxes and 1 combo I would have something like:
cboCust with the tag = 1
txt1 with the tag = 2
txt2 with the tag = 4
txt3 with the tag = 8
txt4 with the tag =16
txt5 with the tag = 32
I have a function that will sum the values for what is populated:
CODEFunction WhatsPopulated(frm As Form, Optional ByRef Total As Integer) As String
Dim ctl As Control
With ctl
For Each ctl In frm.Controls
'TYPENAME RETURNS THE TYPE OF CTL. TEXTBOX, COMBOBOX, LABEL ETC.
Select Case TypeName(ctl)
Case "TextBox", "ComboBox"
If ctl <> "" Then
If WhatsPopulated = "" Then
WhatsPopulated = ctl.Name
Total = ctl.Tag
Else
WhatsPopulated = WhatsPopulated & "," & ctl.Name
Total = Total + ctl.Tag
End If
End If
End Select
Next
End With
End Function
Multiple Languange In One Form Without Use External Text File
Hello..
Is there any way to make multiple language in one form? So, user can change langunge by click menu Languange->English,Spanish, Japan, etc
I have try to make it with using external text file, but user can change the languange within the text file easily.
Thank you so much for any helps..
Best regards,
Maox
Creating Multiple Text Form Instances In Midi Forms
ok i was wondering how i might go about being able to open more then one text file but using the one form i have for the opening text in the program or would i have to make like 15 forms with the same **** and program it to work with all 15?
is there a way to do it with just one?
please help
thanks!
Text Entries
This is what i have so far
Code:
Open "edittext.txt" For Output As #1
Open "originaltext.txt" For Input As #2
x = 1
Do While Not EOF(1)
Input #2, UserName, UserID
If Not NewUser.User.Selected(nIndex) = UserName Then
Write #1, UserName, UserID
End If
x = x + 1
Loop
Close #1
Close #2
It doesn't write anything to text.txt , can anyone tell me what is going on??
Also, how do i rename edittext.txt to originaltext.txt. I think i have to kill originaltext.txt first.
Text Box Entries
I have put several Text Box's on a Form and assigned this as Text in the Text Box's property sheet "[- Available -]". When I try to Type something in th TextBox it won't do it nothing Happens. Do I have to erase what's in the Box and Then Type or What?
Saving Text Box Entries
Is there a way to save the entry in a text box so that the next time the user form is entered the text that was entered the last time appears in the text box?
For example, when my VBA user form pops up I ask for the company name and their website which they enter into a text box. Is there a way for that information to be there when they open the word document in the future?
Thanks.
Mike
Textbox Entries To Show Latest Appended Entries.
How do set a textbox to show the latest appended entry? When data is appended to a text box it always resets to the top of the window. To view the appended data one must scroll down. I would like to keep the latest viewable. Any ideas, please?
Check Entries On User Form
Maybe somebody could give me better direction on how to make a routine that checks entries on a user form. Below is a simplified example of the code I've written. The reality is there are multiple choices and options that can be set requiring some form of error checking. Basically this routine checks the value of the controls, if not found runs the Error Check sub which redisplays the form so the user can correct the mistake. The problem is this assumes the user will then actually correct the mistake before clicking Go again. An earlier attempt at this type of checking had the sub that contains the first bit of code running until all choices were made, but that then activated any called subs after this one multiple times, which is not what I want. I can post the complete sub if somebody is curious. Thanks for any input.
Code:
If UserForm1.Choice.Value = False Then
MsgBox "Choice not made", vbCritical, "Make a choice"
Error_Check
End If
If UserForm1.Choice.Value = True Then
bChoice = True
End If
Code:
Sub Error_Check()
UserForm1.Show
End Sub
1 Form 1 Textbox To Capture 8 Entries
I am re-writing a check register I originally wrote in Basic PDS 7.1
I am 1/2 thru the re-write but I have a small problem
What I'm trying to do is This:
The opening screen will be filled with transactions all ready entered(This is a Check Register Program that I'm trying to re-write as a windows program)This is already done.
At the bottom it will have Printed The question Enter Check Number.Besides That will be a Textbox.The person will type in the number and then press enter. This procedure will be repeated approx 8 times.
The For next loop should be able to display a new question and catch the new answer!
After the last question a Message box will appear asking if you wish to save info. I think the rest would be apparent.
Then the number will be put in a Type End type Data Holder and written to screen
My problem is I can't seem to get info from the keydown event and use the enter key to seperate each answer, I guess is what I'm trying to say.
|