A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Public Sub popicbr(uName As String, uStartDate As String, uEndDate As String) 'collects the code and sum of each code into an array and populates them into the icbr range 'Specifying connections ->> Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset 'turn off updates to speed up code execution With Application .ScreenUpdating = False .EnableEvents = False .Calculation = xlCalculationManual .DisplayAlerts = False End With 'Identify the workbook we are using ->> wkb = Application.ThisWorkbook.FullName 'Open connection to the workbook ->> cnn.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=" & wkb & ";" & _ "Extended Properties=""Excel 12.0;HDR=Yes"";" 'Load the range into a recordset ->> rs.Open "SELECT [Code], Sum([Value]) AS Totals " & _ "From [tbl_cashbook] WHERE ((([Date]) >='" & uStartDate & "' And ([Date]) <='" & uEndDate & "') And (([Details]) =" & Name & ")) " & _ "GROUP BY [Code]", cnn, adOpenStatic If rst.RecordCount > 0 Then rst.MoveFirst i = 0 If IsNull(rst![Code]) Then MsgBox = "Could not detect an records." Else 'collect records into an array containing the code and the sum of each code '----ARRAY GOES HERE End If 'Null test End If 'rs count 'populate the data into the range With wks.icbr 'Populate the array into the workbook range 'Loop here to populate the data 'Start range = icbr_code_start Range("icbr_code_start").Offset(1, 0) = Array(1) Range("icbr_code_start").Offset(1, 3) = Array(1) End With 'release memory rst.Close Set rst = Nothing cnn.Close Set cnn = Nothing 'turn on updates With Application .ScreenUpdating = True .EnableEvents = True .Calculation = xlCalculationAutomatic .DisplayAlerts = True End With End Sub
|In Excel 2007, how can I lock a value in two cells if "Yes" has been selected in a drop-down list?||7||61|
|Excel - INDEX MATCH error||13||24|
I receive an error - Export-CSV-from-Excel-and-