Source: stackoverflow.com --- Saturday, September 24, 2016
I'm trying to use Excel as a Database, and I'm following a tutorial from this site . Problem is, whenever I try to "Update Drop Downs" in the file below, I get this error: "Microsoft is waiting for another application to complete an OEL action". What am I missing or doing wrong here, and how do I get this right? I'm using Excel 2016 Home & Student that's uptodate. I also enable Macros when opening the Workbook. Link to Excel File Private Sub cmdShowData_Click() 'populate data strSQL = "SELECT * FROM [data$] WHERE " If cmbProducts.Text <> "" Then strSQL = strSQL & " [Product]='" & cmbProducts.Text & "'" End If If cmbRegion.Text <> "" Then If cmbProducts.Text <> "" Then strSQL = strSQL & " AND [Region]='" & cmbRegion.Text & "'" Else strSQL = strSQL & " [Region]='" & cmbRegion.Text & "'" End If End If If cmbCustomerType.Text <> "" Then If cmbProducts.Text <> "" Or cmbRegion.Text <> "" Then strSQL = strSQL & " AND [Customer Type]='" & cmbCustomerType.Text & "'" Else strSQL = strSQL & " [Customer Type]='" & cmbCustomerType.Text & "'" End If End If If cmbProducts.Text <> "" Or cmbRegion.Text <> "" Or cmbCustomerType.Text <> "" Then 'now extract data closeRS OpenDB rs.Open strSQL, cnn, adOpenKeyset, adLockOptimistic If rs.RecordCount > 0 Then Sheets("View").Visible = True Sheets("View").Select Range("dataSet").Select Range(Selection, Selection.End(xlDown)).ClearContents 'Now putting the data on the sheet ActiveCell.CopyFromRecordset rs ...
from Microsoft http://ift.tt/2cZExDT
No comments:
Post a Comment