Home |
Search |
Today's Posts |
#1
|
|||
|
|||
What is wrong with this
Private Sub Workbook_Activate() Dim sqlstring As String Dim connstring As String Sheets("Sheet2").Select Range("A1").Select sqlstring = "SELECT statemet" connstring = "ODBC;DSN=Sales;UID=;PWD=;DATABASE=Sales" With ActiveSheet.QueryTables.Add(Connection:=connstring , Destination:=Range("Sheet2!$A$1"), Sql:=sqlstring) .RefreshPeriod = 0 End With End Sub User name and password has been removed. I throught Application.ScreenUpdating = False should work but it does not any idears?? -- bach ------------------------------------------------------------------------ bach's Profile: http://www.excelforum.com/member.php...o&userid=26134 View this thread: http://www.excelforum.com/showthread...hreadid=402924 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot table pulling wrong value | Excel Discussion (Misc queries) | |||
Password box to remain open after wrong input | Excel Discussion (Misc queries) | |||
What is wrong with this =AVERAGE(IF formula? | Excel Worksheet Functions | |||
What's wrong with this vb? | Excel Worksheet Functions | |||
IF function displays wrong amount | Excel Worksheet Functions |