Questions tagged as 'vba'

1
answer

How to look up a column by value = 200 (execute command)?

I want to search the line within the P:P column for a number less than or equal to 200 and run a command. If it is greater than 200 perform another. The values are thus defined 0.0 . If .Value =< 200 Then ActiveCell.FormulaR1C...
asked by 02.06.2017 / 16:40
2
answers

How to assign the formula of cell D2 in a variable?

CODE: Range("AB2").Select Dim tudo As String data_pasta = Format(Date, "/yy/mm/") tudo = "https://pagina.pt/wp-content/imagens" & data_pasta & **D2** ".png" ActiveCell.Value = tudo ultima_linha = Range("A" & Rows.Count).End(xlU...
asked by 31.05.2017 / 17:36
1
answer

Excel validation list - runtime error 1004 - Application definition or object definition error

The deal is like this: I have a vector that contains the items for a dropdown list in excel. The code just below creates hanging lists in cells d5 through d108 in 12 tabs of the month vector. The expense vector contains the items for this drop-d...
asked by 18.04.2017 / 18:54
1
answer

Change Target of a File Shortcut with VBA

I'm changing the name of several worksheets at the same time, but some of them have shortcuts, and in the middle of the change I want the shortcuts to accompany that change. Sub changeTargetPath() Set wsc = WScript.CreateObject("WScript.S...
asked by 17.05.2017 / 16:53
1
answer

How to execute a VBA command on a sheet with a specific name?

I have an Excel document with multiple sheets. In this document I need to execute a command on a specific sheet, ie the sheet name. But if this sheet does not exist run another command on another specific named sheet until the sheets are finishe...
asked by 25.05.2017 / 22:41
1
answer

Excel - Tables - Identifying the next line

Good afternoon. This is my first question here. Right now, I thank anyone who can guide me. I made a spreadsheet with some tables (tab "Home", "Format as table"). Then I made a VBA to clear this table and insert new information from a text fi...
asked by 28.04.2017 / 21:59
1
answer

How to prevent access with macros disabled? [closed]

I have a registration form that appears as soon as we open the worksheet. The registration list (in the sheets) is invisible and can only be accessed by password when clicking the "Database" button. However, when a person accesses it for the fir...
asked by 05.03.2017 / 02:48
1
answer

problem to popular an option control type

I have a VBA code but I'm having trouble popping an element. When you have put data in the control the following error message appears: Run-time error '2146233079 (80131509)': unknown error: can not focus element ... Sub x() Dim ob...
asked by 26.12.2016 / 18:36
1
answer

SendKeys does not work with accented word in VBA - Excel

I'm developing a script in VBA, in Excel. This code will populate another program, using the data collected in the cells. But cells that contain a word that has accents are not working. I'm using Application.SendKeys as in the follow...
asked by 06.01.2017 / 01:37
0
answers

multiple index control tables [closed]

I need to mount a control table of as many tables, it's basically a multiple index control that informs the position of these tables of data. Edition: after several attempts until using SQL directly I think I came to a basic conclusion using...
asked by 06.12.2016 / 17:11