hi
not the fogiest idea .. :(
rdsDC must be an object
all following .xxx statements are the object's properties
all variables after = are values
that all there is to it...
User Profile
Collapse
-
albertw replied to getting data from a text file and putting it in an excel file using visual basic 6.0in Visual Basichi
need to be an .xls or can it be a .csv file?
1st case is nasty, you need to create a new or access an existing exelfile.
see vb sample 'Geofacts'
2nd case is easy, as csv stands for 'comma separate value'
open a file 'test.csv' for output ....
print your data as: value1,",",valu e2,",", etc
try commas and/of semicolons and see what it does.
close the file and open...Leave a comment:
-
hi
your selstart / sellength statements make the textbox reset itself.
better use these statements on getfocus...Leave a comment:
-
hi
you can also call
if IsNumeric(Text1 .Text)=True or Val(text1.Text) <0 then
msgbox "Enter only digits and positive values",vbOKOnl y+vbExclamation "
Text1.SetFocus
endif
but you can use this statement only after input of data in the textbox...Leave a comment:
-
hi
open a new method of your textbox -- KeyPress
Private Sub Text1_KeyPress( Index As Integer, KeyAscii As Integer)
If InStr("01234567 89" + Chr(8), Chr(KeyAscii)) = 0 Then KeyAscii = 0
End Sub
the only keystrokes your textbox will swallow are figures :)...Leave a comment:
-
i would be very thankful for anyones help[/QUOTE]
hi
i should do this differently use Case instead
Private Sub back_Click()
Select Case Level
Case is = low
Worksheets("Low lev").Visible = True
Worksheets("Low lev").Select
Case is = medium
Worksheets("Med iumlev").Visibl e = True
Worksheets("Med iumlev").Select
Case is= high...Leave a comment:
-
hi
suppose your string strValue holds "2,e,f,5,6, h,u"
then
array=split(str Value,",") 2nd argument is delimiter
first item of the array will be array(0), value 2 etc...Leave a comment:
-
If IsNumeric(txtWi nd.Text) = False Or val(txtWind.Tex t) < 0 Or Val(txtWind.Tex t) > 25 Then
MsgBox("Please Enter Positive numbers or values smaller than 26 only!")
Exit Sub
End If
???Leave a comment:
-
hi
need to add a bookmark !
Set oDoc = oWord.Documents .Add
oDoc.Bookmarks. Add "Complaint"
oDoc.Bookmarks( "Complaint").Ra nge.Text = compnum...Leave a comment:
-
hi
create an example:
sheet 1
row 1, column A = Product ID
--------, col B = Year
--------, col C = Type
--------, col D = Number
fill the cells with whatever values you like (it's just an example)
copy sheet(1) row 1 col A-D to row 1 col I-L (search part)
copy sheet(1) row 1 to sheet(2) row 1 (so create same headers)
create a button (using VB options)...Leave a comment:
-
hi
declare your progressbar.val ue as value, not as string !
If ProgressBar1.Va lue = "90" Then
should be
If ProgressBar1.Va lue = 90 Then
look at your progressbar property: max and min
values should lay between those 2 values
in case the progressbar.val ue should exceed the max-value
build an errortrap such as
if Newvalue>Progre ssbar.Max...Leave a comment:
-
hi
easiest method is to put a combobox somewhere over your datagrid
(move in run-time for exact location)
then fill the combo with items from your database....Leave a comment:
-
Leave a comment:
-
just click my 'picture' to see the profile
by the way, learning VB is just open any program, read and try to understand what others have done.
it takes a while .... :(...Leave a comment:
-
-
hi
create a splash screen
then call your project as usual
...Code:frmMain.Show frmMain.Refresh frmSplash.Show 0 frmSplash.Refresh Start = Timer '--- have some code running on the background if you like while Timer<Start+3: Wend '--- in this case 3 seconds delay from start showing the splash to here frmSplash.Hide '-- continue your code
Leave a comment:
-
hi
don't think you can change the macro in run-time
guess you're stuck here....Leave a comment:
-
first of all julius, there are no sirs here :), thank you.
Do
-- start a loop
DoEvents
-- look if no other thing (keystrokes or whatever occur)
RxTxt = MSComm1.Input
-- name your mscomm input RcTxt
If Len(RxTxt) > 0 Then strBuffer=strBu ffer + RxTxt
-- if RxTxt holds data, transfer this to a buffer, called strBuffer
Loop Until RxTxt = Chr(10)
-- if the...Leave a comment:
-
now i'm going to suggest some things which you already did (maybe)
password protected database?
create a new connectionstrin g
(very stupid) your datagrid forecolor? or even fontsize?...Leave a comment:
-
hi
put this code in your codepage belonging to ThisDocument (NOT the module)Code:Private Sub document_close() ActiveDocument.SaveAs FileName:="Original.doc", fileformat:=wdFormatDocument ActiveDocument.SaveAs FileName:="BackUp.txt", fileformat:=wdFormatText End Sub
the document will be saved as "backup.txt " and as "original.d oc",...Leave a comment:
No activity results to display
Show More
Leave a comment: