Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, here is the problem I have: the macro s result is instead of inserting
the data in the cell of the next row(Range("K" & R & ""), a new column is created each time. Can you figured out the problem? Do Until Cells(R, 5) = "TOTAL:" R = 8 FrstDay = 7 LastDay = 14 Card1 = Cells(R, 4) Sqlstring = "select sum(Temps_Arrondi) from Presence_BCV_App where _Card= '" & Card1 & "' and ([Date] '" & FrstDay & "' and _[Date] < '" & LastDay & "') " connstring = "ODBC;DSN=DEV_DCI;UID=sa;PWD=abcde;Database=DEV_DC I" With ActiveSheet.QueryTables.Add(Connection:=connstring , Destination:= _Range("K" & R), Sql:=sqlstring) .Refresh BackgroundQuery = False End With R = R + 1 Loop |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Result is "V6", need Excel to use cell "V6", not the resul | Excel Worksheet Functions | |||
when a "check box" is checked, a "result" to be shown in another c | Excel Discussion (Misc queries) | |||
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) | |||
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc | Excel Programming |