Questions tagged as 'vba'

1
answer

Excel VBA - How to use VLookup with Letters and Numbers to Delete Rows?

Hello! I'm experiencing great difficulty with a problem using VLookup in Excel VBA. First of all, I am not VBA expert but I have been able to use VLookup but I am not having the effect I would like. I will explain below with more detail the situ...
asked by 07.02.2017 / 15:59
1
answer

INSERT with Random SELECT

I have a table with a lot of information and an empty one. I need to make an INSERT on this empty table with just one information from the other table, but SELECT must be random. I'm using the following line in VBA: db.Execute "INSERT IN...
asked by 30.09.2018 / 08:15
1
answer

The 'Value' method of the 'Range' object failed

Good night, I have the following error:    The 'Value' method of the 'Range' object failed The full code is here: GhostBin Hair PrivateSubCommandButton2_Click()'''Botão"CADASTRAR" código para inserir as informações fornecidas na pl...
asked by 20.11.2018 / 01:20
1
answer

ScreenUpdating x On Error GoTo ErrorHandler

With the code below: Application.ScreenUpdating = False Application.EnableCancelKey = xlDisabled On Error GoTo ErrorHandler 'Código Exit Sub ErrorHandler:Application.ScreenUpdating = True 'Código caso erro End Sub ScreenUpdating = False...
asked by 21.10.2018 / 02:48
1
answer

How to "kill" a class in VBA - Excel

I have a code that calls a Private sub which in turn erases the data from a worksheet. If I do the same procedure without closing the form it gives error at the time of erasing the data, however if I create a new sub with another name and the sa...
asked by 19.10.2018 / 19:07
1
answer

How to add content to the Excel VBA ListBox

Hello, I have a question in a code for Excel VBA. I want the code to search the worksheet for the same number that was typed in TextBox , after finding it, sends the information from the entire spreadsheet to ListBox . Since the code...
asked by 15.07.2018 / 03:37
1
answer

Access Site By Loggin

I am not able to access this site below because I can not find a way to enter the Login and password in VBA. Would anyone know how to access these fields   link I tried to access looking for frames, but still could not access     
asked by 26.10.2017 / 20:48
1
answer

AutoFilter Excel VBA

I have a problem, when trying to make an autofilter in vba it is trying to filter the values I chose but it does not filter value, I searched a lot and found no explanation. The code is as follows: Dim nomeArquivo As String Dim gd As I...
asked by 19.09.2017 / 20:52
2
answers

How to concatenate or use commercial & date & text?

I'm using the following code to display only the day and the month. Range("AB2").Select ActiveCell.Value = "=Now()" ActiveCell.NumberFormat = "yy/mm" ultima_linha = Range("A" & Rows.Count).End(xlUp).Row Range("AB2").AutoFill Destination:=R...
asked by 30.05.2017 / 18:43
2
answers

How do I add spaces before a number?

I'm trying to add spaces before numbers. The first code worked fine, but I wanted to do it in the form of loop . Sub numeros() numero = Range("A2").Value n = 3 If Len(Range("A" & n).Value) = 3 Then numero = Range("A" & n)...
asked by 09.06.2017 / 02:58