Skip to content

Instantly share code, notes, and snippets.

@jovib
Last active April 20, 2017 14:51
Show Gist options
  • Select an option

  • Save jovib/11e61706148674882eac5951cd8b0b9a to your computer and use it in GitHub Desktop.

Select an option

Save jovib/11e61706148674882eac5951cd8b0b9a to your computer and use it in GitHub Desktop.
Carga valores de SQL en diferentes hojas de excel.
Sub update()
Application.ScreenUpdating = False
Prompt = "Por favor tenga paciencia, este programa tomará algunos minutos..."
Title = "Actualizar"
Style = vbOKCancel
Respond = MsgBox(Prompt, Style, Title)
If Respond = vbCancel Then Exit Sub
''Mostrador es el nombre la hoja de excel, A1 la celda
Sheets("Mostrador").Select
Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment