Grid Shows B-A Instead Of A-B
Hi, All!
My grid is showing the last item in the array first instead of the first item. Tried looking for a Sort property for the grid (MSHFlexGrid), but there isn't one. Don't know where else to look.
Below is the code.
Any help would be appreciated!
Thanks in advance,
vbprogwb (Bob)
'ReDimming the array 'As names and etc., are added to the Little Black Book
ReDim BlackBook_RecArray(totalRecs) RecCount = totalRecs
Grid1.Col = 1 Grid1.Row = 1
'This fills up the array with Type - udtItemRec/itemStruc
For X = 1 To RecCount Get #1, X, udtItemRec BlackBook_RecArray(I) = udtItemRec.strLName & Chr(9) & udtItemRec.strFName & Chr(9) & udtItemRec.strPhone & Chr(9) & udtItemRec.strEmail I = I + 1 Debug.Print BlackBook_RecArray(I) 'x = x + 1 Next X I = 0 For I = 0 To RecCount - 1 If I <> RecCount Then Debug.Print BlackBook_RecArray(I) Grid1.AddItem (BlackBook_RecArray(I)), 1 End If Next I
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
BitBlt (nothing Shows Up)
Hi, I want my pic1 picturebox to show up somewhere on top of the screen (which displays over EVERYTHING). My project file is attached. I have been trying to figure this one out for some time now.
Thanks in advance.
Vb Shows 2 Forms Instead One
i made something like de MDI sample from the VB help.when i reference the first element of the array(an array of forms),Vb loads 2 forms.And the UBound() of the array shows that is only one element in the array.
That'is when i reference array(0),Vb shows 2 forms and UBound(array)=0.any idea?
thanks
Err.Number Shows 0
I have the following code that, on an error, writes to a DB.
The problem is, when I get the first error in the select case,
run-time error 76 - Path not found
my error reporting doesn't show Err.Number as 76 but 0
Also Err.Description is empty as well.
Am I missing something obvious here?
vb Code:
Private Sub mnuHelpBackup_Click()On Error GoTo ErrTrap Dim BackupDestination As String 'get backup destination from registry (Options form)BackupDestination = GetRegistryStr(hkeyCurrent_User, strSubKey, "BackUpPath") 'copyfile actual fileFileCopy App.Path & "CLDB.mdb", BackupDestination & "CLDB.mdb" Exit Sub ErrTrap: Select Case Err.Number Case Is = 76 'path not found - possible folder deleted or moved MsgBox "The selected path does not exist. It may have been " & vbCrLf & _ "moved or deleted. Please select a new path.", vbOKOnly + vbInformation, _ "Path does not exist" Case Is = 4004 'Backup failed MsgBox Err.Description & vbCrLf & "Error number " & Err.Number, _ vbOKOnly + vbInformation, "Backup Error" Case Else MsgBox "Database cannot be copied." & vbCrLf & "Error Number = " & Err.Number & vbCrLf & _ "Error Description = " & Err.Description, vbOKOnly + vbInformation, "Backup Error"End Select ProcedureName = "frmCodeLib mnuHelpBackup"Call ErrorControl(strUser, Err.Number, Err.Description, ProcedureName, _ Format(Now, "dd/mm/yyyy"), Format(Now, "hh:mm:ss"))
EDIT
When run in the VB IDE this works, but when I compile the program, I get the problem explained above.
Listbox Shows Twice The Same Value
Hi, I was just wondering how do you do this:?
Add something to the listbox but if the value I added is already in there, then it does not come up again. For example, If I add the Name "George" to the listbox and try to add it again, the name "George" should not come up again since its already in there.
How can I do this with the IF....THEN statement?
Thank You,
EnYcE
Color Cursor Shows Up B/w
I loaded various color cursors into form/picture box properties but they only show up black on white. Any ideas why?
Unwanted Form Shows
I started programming with a normal form as the startupform. I have several forms now and replaced the initial startupform with an MDI as the startup object (and made all my other forms 'CHILD')...
Unfortunately when I run the program some of my forms are loaded when I'm not wanting them to. I had to add some useless 'Unload frmxx' code to my project to prevent this...
Before, when I didn't have an MDI, it never happened.
I'm almost sure I'm not loading these forms in my code...
How comes they appear anyway
tia
You Slove One Problem And The Next Shows Up
ok i need to clear the form so that the bullets wont make a line but by clearing the form the "plane" blinks and it is very annoying. make it stop blinking or tell me how. sry if the dl doesnt work right this is my first time using it
PPT: Access Custom Shows
I've been looking for help with this for days and I'm just stuck. I want to select powerpoint slides defined in a custom show and copy them to a new presentation. The only thing google turned up was a 3rd party extension...and that won't work. Frustrating.
ActivePresentation.SlideShowSettings _
.NamedSlideShows("Quick Show").Delete
You'd think, I just change "delete" to "copy"...but no...that doesn't work either.
I got this far, but it shows the slide IDs in a message box; I need them to add themselves to a range Array and I can't figure out how to get them there instead of in a mesage box:
idArray = ActivePresentation.SlideShowSettings _
.NamedSlideShows("show a").SlideIDs
For I = 1 To UBound(idArray)
MsgBox idArray(I)
Next
ActivePresentation.Slides.Range(Array(I)).Copy
Presentations.Add WithWindow:=msoTrue
ActiveWindow.View.GotoSlide Index:=ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutTitle).SlideIndex
ActiveWindow.View.Paste
I'm lost. Any help greatly appreciated.
Form Shows Up Late
I'm making a Form that shows a file copying progress. The copy procedure starts on FormLoad. What I'd like to do is to show the whole form and the label.captions... before it starts copying. 'Cause now it just copies the files and shows the form after that.
Flexgrid Shows No Rows
I've been away from VB stuff for a number of months.
Today I opened up my projects and none of the mshflexgrids shows any rows.
I've got them bound to ado controls. I've tried doing an adoctrl.recordset.recordcount to make sure that there should be rows to show, and I get the correct amount of rows, but the rows never show in flexgrid.
The same is true with all the flexgrids in all my projects.
Control That Shows Webcam
Where can I get a control that shows me my webcam's picture, and let me capture it and stuff? I'm sure that there's already one on my computer, but maybe not.
Thx!
Flexgrid Shows Only One Line
I have a problem where a flexgrid will only display one line of data on one machine in the network - it works perfectly on the other machines in the network.
The data is being loaded from a text array.
Thanks for any hints on what may be causing this strange behaviour.
Nothing Shows After Maximizing The Window
Hi:
I’m relatively new to vb. I’m using vb 6 and am having problems with a window not showing correctly. The application uploads a file via ftp to a server. If the window is minimized while the file is being uploaded and then is maximized again, nothing shows in the window until the file is through uploading. I’m not quite sure where to start to correct this. Any help would be appreciated.
Thanks in advance for the help.
Chris
Which Type Shows Decimal.
Hi, im doing a sub routine that calculates a number that is shown as a currency in an excel sheet.
When i had the variables set to Long's it was fine but seemed to round to the nearest number. I tried variant and that worked but then an adding formula i had wouldnt work because it took the values as strings. So im stuck kinda. Either i find a type that works or find out how to switch the variant into a long in the subroutine. Thanks.
Date Shows Up As Time
When updating a record in my table with a new date, the date shows up as a time when I query the record. Looking at the field inside the actual database it looks like there's a date with the year 1895 (not sure how that got there) and a time. Here's my code:
dteDate = Date
strSQL = "UPDATE Topics SET DocumentName = """ & strFileName & """, ChapterTitle = """ & strChapterTitle & """, TopicTitle = """ & strTopicText & """, Notes = """ & strNotes & """, DateModified = " & dteDate & ", IsAddenda = " & blnIsAddenda & ", ProjectName = """ & strProjectName & """ WHERE ID=" & intRecordID & ""
myDB.Execute (strSQL)
The column in my Access database if set to the ShortDate format. Any ideas? Thanks.
If Nothing Shows Up Have A Listbox Say Sometihng?
Hey guys i have a listbox called list11, and it has the results of a scan from a button. IS there a code to get it that if nothing shows up in the list11 listbox, that an item would show up saying "Nothing found"
??
thank you.
Form That Shows Loading Bar
how would i go about making a preload form that displays a loading bar and then loads the main mdi form after its finished...? here is an example
Text Box Shows Number
hope you understand this i need some coding.......
If i type a number from 0-82 in text1 i want text2 to show the number 1
if i type a number between 83-174 i want text2 to show the number 2
if i type a number between 175-276 i want text2 to show number 3
this seems like really simple coding but i am a noob to vb i am just messing with it thats how i learn
Frame Shows Form
How can I make a frame(the one vb6 provides) show a form?
I tried this but it didn't work:
Private Sub Frame1_Load()
Frame1 = Form.show
End Sub
Anyone knows how?
VbTab In String Shows A Bar??
I have a string as follows
str = "ABC" & vbTab & "DEF"
when I put str into a flexgrid cell the tab converts into a thick vertical bar.
What do I need to do for it to actually put in a tab?
Thanks as always!
Steve
ps. I am still bang my head against the wall regarding how to define a Band in an Hierarchal Flex Grid (so I can make different columns different background colors)
Textbox That ONLY Shows Numbers ??
How do i make a textbox that you ONLY can write numbers in ?
I thought of something like this:
VB Code:
If txtNumbers.Text = "a" or "A" ThentxtNumbers.Text = ""End If
It works fine, but it will just be a hell of a lot of work !
And i'm... pretty lazy
Regards
A Quickie: Which Example Shows Better Form?
I have a quiz program that runs quizzes built off simple text file scripts.
One of the functions in the quiz editor is to jump the cursor to the first question. To do this I split the lines of the text box into an array called LineStr(). I start from the top and skip the optional file info tags, answer pools, and first chapter mark.
Tell me which way of tackling this a seasoned VB programmer would approve of more:
Code:
x = 0
Do
Temp = Left$(UCase(LineStr(x)), 5)
Select Case Temp
Case "TITL:", "AUTH:", "COMP:", "MODI:", "MVER:", "NOTE:", "TIME:"
x = x + 1
End Select
Loop Until Temp <> "TITL:" And Temp <> "AUTH:" And Temp <> "COMP:" And Temp <> "MODI:" _
And Temp <> "MVER:" And Temp <> "NOTE:" And Temp <> "TIME:"
or
Code:
x = 0
Do
Temp = Left$(UCase(LineStr(x)), 5)
Select Case Temp
Case "TITL:", "AUTH:", "COMP:", "MODI:", "MVER:", "NOTE:", "TIME:"
x = x + 1
Case Else
Exit Do
End Select
Loop
I know it seems totally trivial, but I just want to write code that won't have my fellow programmers scratching their heads or rolling their eyes.
Shows Up In Task Manager.
I'm writing a program in WindowsXP that I don't want to clutter up the users taskmanager window under Applications when its running. Now at first I figured I would have to register it as a service in the API but I found out that you can no longer do that in XP.
I was wondering if anyone else knew how to remove it from the Applications menu, and only make it show up if the click on the Processes menu next too it which shows all exes running.
Thanks for any help which you can render.
Which Control Shows The Desktop
Does anyone know which control, or how to manipulate the DriveList Control, to show the Folders, My Documents, My Computer, and Desktop, As they are shown in the SaveAs Dialog in most of the Office Products?
Thanks In Advance
My Installed .exe Shows A Message
Hey, friends, look what is happening to me:
After finished, I made a distribution package of my VB 6.0 program (.cab, setup.exe, and so on)
I tried to install it in several pc's, all of them with at least win95.
In some of them, when attemping to install, a message appear telling me something is needed about windows installation and the system must be restarted. When this, I did it.
In those cases, after restart the computer, I have to run setup.exe again, and the program is installed succesfully. (it seems to).
But when I try to execute the program at start-programs menu, a new message box appears telling me something like:
"You don't have the right license to use this functionality"
What's happening?
I do not understand why, cause it does not ocurrs in every computer, some of them work perfectly.
Somebody knows why?
Heyner.
Textbox Shows A Date
i am adding a summary to my application ..
how can a text box shows the last modified record date ( the date for the last record entered to the Database ????)
What API Shows A PictureBox In Greyscale?
Hello,
I'm developing an Activex control and need to do a PictureBox show a picture in
greyscale.
Is there a Windows API to do that?
Thanks for any help
michel_junior@hotmail.com
Data Shows On My Computer But Not On Others.
Hello all,
I've been working on a project that displays data from a Data Environment object which connects to a few different Access databases. Everything works fine on my computer, but when I try it out on another computer, none of the data loads for one (and only one) of the forms. Does anybody know any possible reason for this to happen?
The only difference between the data on this form and the others is that I was using data shaping, but I re-configured things to avoid data shaping and the problem is still there.
Kael
Grd Shows More Data Than It Should. URGENT
I have a datagrid connected to a table in an MS Access 2002 database by ADODC. This table contains a list of items.
When I run the program, the grid shows the complete list of items but at the end there are some of these items re-listed again (like ghosts of previous rows). These additional rows do not exist in the underlying database table when I open it alone with Microsoft Access.
I tried to delete the ADODC control and put a new one. I also tried to remove the grd and put a new one. No use.
If I simply delete these rows, then I check the database table, the original rows that are not repeated are missing.
What's going on?
Eman_2005
Technical Communicator
www.smartistek.com
Minimize To Systray Still Shows Title Bar
I followed the tutorial on min to systray and this now works fine. However, i have set showintaskbar to false and when i min to systray it still appears as a moveable title bar on my desktop (sorry i dont know what the correct title for this thing is - basically the head of my form). Any ideas how to remove this so when i min to systray i'm left with no trace of the program until I double click (on systray icon) to return it?
Thanks
Mail Merging -- .dot Template Shows!?
Hello All...
I'm a newbie so bear with me.
I'm mail merging a .dot file with an record from an Access .mdb based on a button click in a userform in a different application...(all in VBA)
System flow is supposed to be:
-button click
-write to mdb
-open word document with merged fields based on .dot and specified record
The thing is, when word is opened, the mail merged document shows AND an extra un-merged document based on the .dot!
How do I get rid of the extra one?
TIA, Joni
Code:
Dim docs As Word.Documents
Dim strWordTemplate As String
Dim strDocsPath As String
Dim strTemplatePath As String
Dim strTestFile As String
Dim strTest$
Dim pAppWord As Word.Application
Set pAppWord = New Word.Application
Dim pDocWord As Word.Document
strDocsPath = pAppWord.Options.DefaultFilePath(wdDocumentsPath) & ""
strTemplatePath = pAppWord.Options.DefaultFilePath(wdWorkgroupTemplatesPath)
If Merge = "Assign" Then
strWordTemplate = strTemplatePath & "Parks" & "Schedule_A.dot"
ElseIf Merge = "Reserve" Then
strWordTemplate = strTemplatePath & "Parks" & "Schedule_B.dot"
End If
pAppWord.Documents.Add strWordTemplate
Dim sDBPath$
With pAppWord.ActiveDocument.MailMerge
.MainDocumentType = wdFormLetters
'Set up the mail merge data source to WorkingSeaview.mdb.
sDBPath = "I:MAPSeaviewSystemWorkingSeaview.mdb"
.OpenDataSource name:=sDBPath, _
SQLStatement:="SELECT * FROM For_Notification WHERE Grave_Number = '" & Grave_Num & "'"
.Execute
End With
With pAppWord
.Visible = True
.Selection.WholeStory
.Selection.Fields.Update
.Activate
.Selection.EndKey Unit:=wdStory
End With
ErrorHandlerExit:
Set pAppWord = Nothing
Exit Sub
Excel Opens, Form Shows
hi everyone!
i was wondering if you know some trick so as to make Excel show a form every time it's opened, no matter the file the user wants.
(so i guess "workbook_open" doesn't deserve to be considered)
suggestions?
thanks! >>> damkauf
Connection String Still Shows NULL ?
Another error... I have declared the cnn string as public in a module but for some reason when i debug the string has a null value. It is not getting passed into the code ? Any reasons why this is happening.
rst.CursorLocation = adUseClient
rst.Open SqlString, cnn, adOpenStatic
'Set rst = cnn.Execute(SqlString)
rst.MoveLast
runtime error 3709
Object is not allowed on an object referencing a closed or invalid connection
OLE Shows Icon Instead Of Content (S.Pack 2)
Problem:
Computer had XP service pack 2 installed, now OLE doesn't work to show content of linked object in a rich text box.
In the affected program, users can import bitmaps into the text within a rich text box. Since installing XP service pack 2, an ICON (with the filename below it) is displayed instead of the actual bitmap. Also, doubleclicking the icon does NOT activate mspaint.exe as it normally should under OLE. Confirmed that *.bmp files were associated with PAINT.
I tried to force conversion to display of the bitmap content with:
...OLEobjects.Add ,,filename$
...n%=OLEobjects.Count-1
...OLEobjects(n%).DisplayStyle=0
Still doesn't work.
Any ideas?
Click A Label And It Shows More Labels???
Hey everyone...
I'm having a lot of problems figuring out how to do this:
Books
Videos
Magazines
Transactions
Now, when someone clicks on the label, say, Books..it should look like this:
BooksSearch BooksView All BooksCheck out A BookVideos
Magazines
Transactions
Then, when someone clicks on, say, Search Books...it takes them to the proper form.
Of course, Books, Search Books, View All Books, etc. are all Labels, and they are inside a frame...
I'm just curious as to how I would make the "Videos", "Magazines", and "Transactions" labels move down to make room for the new labels...
Can anyone help? Maybe point me to a good tutorial? I can't find anything about this anywhere...or maybe i'm just not entering the right search terms!!!
Thanks in Advance everyone..you all have been a HUGE help!!
Chaos
The Little Line That Shows Up Between Items In A Menu
How do you create that little line that shows up between some items in menus. For example the one that shows up between "Save As..." and "Print Setup" in the file menu in internet explorer, or between "Open Project" and "Add Project" in Visual Basic.
Only The Last Line Of Text Shows In My TextBox
output.Text = "Rc = " & Round(rc, 3) & " ohms"
this is an example from my program. I think that there is supposed to be a "go to next line" character because the computer is displaying each new line on top of the old lines even though MultiLine is set as true.
any help would be appreciated and thank you,
Ryan
Datagrid Shows Dates, But Not Time.
I have a simple table with date/time (MS Access) fields. When I load this table into the datagrid, only the date is shown. No time. Anyone know a resolution to this? Is this a normal issue with datagrids? The datagrid itself must remain very flexible, so I can not statically format columns.
TIA!
[VB6] Txtbox Shows Account Balance
hi.. how do i create on form load txtbox check a text document file example balance.txt and displays the balance into the textbox? Please teach me how to make it write into the text document too, i'm have to make a deposit function as well.
Thank you so much guys, the people in this forum are really friendly.
Progessbar That Shows The Progress Of A Web Page?
Hi, my first post to these forums.
I'm making a web browser in VB6 and have run into a problem.
I can't get the progress bar (ProgressBar1) to show the progress of a page in the browser (wWeb).
Does anybody have any ideas on what I can do? Thanks.
KW
Vb - Splash Screen Shows, Then It Closes Itself
no matter what file i try to open, or even if i open vb by itself, the splash screen shows, then it closes soon after.. no error nothing
i have vb6 sp6
anyone know what could be causing this?
Combo Select Shows Text Box
How do i write the following in vb?...
If i have a combo box called cbo_NoOfPieces. The numbers 1 to 10 are displayed inside the combo box. When the user clicks number 2 then i want to display 2 text boxes.
If the user selects 3 from the combo box i need to display 3 text boxes. and so on...
any ideas?
ta
How Do I Create A List Box That Shows All Printers
I would like to ask you if you know how to create a list box that shows all the availible printers is a list box, the design that i would like to create is based on the printer options in Microsoft Word. If you know how then could you let me know.
Rohan
Displaying A Form So It Shows On The Taskbar
I have an ActiveX DLL which contains a particular data entry form. When the DLL is called by an appropriate EXE, and this form is displayed, it does not appear on the taskbar despite having the 'ShownInTaskBar' property set to true.
The form itself is set to 'Fixed single', it has a control box, minbutton and maxbutton ... but with any combination of these I still cannot get the form to appear on the taskbar.
Any ideas and help greatly appreciated....
|