No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
19 Posted Topics
Re: If are a diehard ADO user. Here is the connection string for Excel sXL = "c:\DaniWebExample.xls" Set Cn = New ADODB.Connection Cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sXL & ";Extended Properties=Excel 8.0;Persist Security Info=False" Cn.ConnectionTimeout = 40 Cn.Open The rest is the usual ADO recordset retrieving technique | |
Re: Use Stored Procedures for inserting values and use @@Identity to get the last inserted ID (hope this is your primary key) Cheers Shasur | |
Re: Use the MSHFlexGrid1.Refresh after every change in your control If you are updating data you can use this in MSHFlexGrid1_AfterUpdate event too | |
Re: Hi The following post can help you [URL="http://vbadud.blogspot.com/2008/05/using-excel-as-database.html"]http://vbadud.blogspot.com/2008/05/using-excel-as-database.html[/URL] Cheers Shasur | |
Re: Hi Try explicitly referencing the Ranges in Range(Cells(1, col), Cells(Rows.Count, col).End(xlUp)) Cells(i, col).Value with the sheet names, i.e., Sheets("Menu).Cells(i, col).Value etc Cheers Shasur | |
Re: Looks like code using API to logoff, shutdown windows | |
Re: ' There are multiple ways to achieve that: ' 1 Use Global Variables : Declare them as Public in a Module so that it becomes applicable to all modules ' 2 Pass By Reference : When you pass a variable as reference, you are actually refering the memory ' 3 … | |
Re: ' Here is the code -- beware I am deleting all Rows.. Please add condition to the query ' I would also advise you to modify the logic in future, to retain the row and flag the row as delete Sub Delete_Rows() Dim Cn As ADODB.Connection '* Connection String Dim … | |
Re: You can do that by Redim statement [INLINECODE] Sub Array_Dimensioning() Dim arTemp() As Integer ' Preserved Array Dim arTemp1() As Integer ' Array without Preserve ReDim Preserve arTemp(1, 1) ReDim arTemp1(1, 1) arTemp(1, 1) = 1 ReDim Preserve arTemp(1, 2) arTemp(1, 2) = 2 ReDim Preserve arTemp(1, 3) arTemp(1, 3) … | |
Re: All your PRinters are listed in the printers collection. The VB6.0 code would be Sub Select_A_PRinter() Set Printer = Printers("Your Printer Name") End Sub | |
Re: If opnMale = True Then iL1 = 3 il2 = 4 ElseIf opnFemale= True Then iL1 = 2 il2 = 3 End If | |
Re: Double is the equivalent for float Here is the way to do that Sub Convert2_Dbl() Dim Recieved_data As Integer Dim batt_voltage As Double Recieved_data = 2 batt_voltage = CDbl(Recieved_data * 0.0390625) End Sub | |
Re: If this is the message popped up by Excel you can cancel that by Dim oXL As Excel.Application oXL.DisplayAlerts = False after you complete you can reset by oXL.DisplayAlerts = True | |
Re: Here is the way to overcome that: Sub Open_n_Save_as_Text() Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="c:\test\testfile.csv", FileFormat:=xlCSV Application.DisplayAlerts = True End Sub | |
Re: Try with DCOM [URL]http://support.microsoft.com/kb/268550/EN-US/#Endpoints[/URL] should help you | |
Re: Here you have it. Insert the pattern of the IP Address you wanted to check Function IsIPAddress(ByVal sMatchText As String) As Boolean Diml sPattern As String Dim oRegex As RegExp Dim oRegexFnd As Object On Error Resume Next sPattern = "" ' Your IP Address PAttern IsIPAddress = False Set … | |
Re: You can use the filter function to get the 'acne' array alone ' If you have the existing contents in [COLOR=#3333FF]arOriginal then[/COLOR] [COLOR=#3333FF]arFiltered = Filter(arOriginal, "acne")[/COLOR] should give you the results containing 'acne' alone in [COLOR=#3333FF]arFiltered array [/COLOR] | |
Re: Sub Moving_Files() Dim oFS As FileSystemObject ' Easiest way FileCopy "c:\temp\IamAStar.xls", "c:\temp\backup\IamAStar.xls" Kill "c:\temp\IamAStar.xls" ' Using File System Object - You need to Include Microsoft Scripting Runtime in you references Set oFS = New FileSystemObject oFS.MoveFile "c:\temp\D8C7I12.xls", "c:\temp\backup\D8C7I12.xls" End Sub | |
Re: This will do the iteration Sub Modify_Trial() Dim i '/* Edit Boot.ini's Timeout Line */ 'Call edit_bootini("c:\boot.ini") For i = 1 To 100 Call edit_bootini("c:\textfile" & i & ".ini") Next i End Sub Then in the new procedure read the file use the replace () function to change the required … |
The End.