Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
Private Sub Command1_Click() On Error GoTo Error_Handler Dim fdg As FileDialog, vrtSelectedItem As Variant Dim strSelectedFile As String Set fdg = Application.FileDialog(msoFileDialogFilePicker) With fdg .AllowMultiSelect = False .InitialView = msoFileDialogViewDetails If .Show = -1 Then For Each vrtSelectedItem In .SelectedItems strSelectedFile = vrtSelectedItem Next vrtSelectedItem Else End If Dim StrSQL As String StrSQL = "Delete * from Scrap;" DoCmd.SetWarnings False DoCmd.RunSQL StrSQL DoCmd.SetWarnings True DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "Scrap", strSelectedFile, True, , False End With Set fd = Nothing Exit_Procedure: Exit Sub Error_Handler: DisplayUnexpectedError Err.Number, Err.Description End Sub
Public Sub DisplayUnexpectedError(ErrorNumber As String, ErrorDescription As String) Select Case Err.Number Case 2522 MsgBox "You did not select an Excel file" End Select End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.