Questions tagged as 'vba'

1
answer

Excel - VBA: I need support to link the Max function

How can I reference a column of a certain sheet using the below command in VBA? Application.WorksheetFunction.Max     
asked by 29.09.2016 / 23:00
1
answer

How to return the data handling in Matrix passed as parameter to routines in VBA / Excel?

I need to pass distinct arrays to a routine that sorts its elements and receives other treatments, and then I want it to return those sorted and treated values to the original array ; for example, I passed out-of-order values and some fractio...
asked by 05.07.2016 / 19:53
1
answer

number even, odd, zero and greater than 10 how to find it? [duplicate]

For g = 1 To 10 For f = 1 To 10 Cells(f, g) = Int(100 * Rnd()) k = Cells(f, g) If Int(k / 2) - k / 2 = 0 Then pares = pares + 1 Else Impares = Impares + 1 End If If k = 0 Then Zeros = Zeros + 1 If k...
asked by 09.07.2016 / 19:48
1
answer

How to make a public routine for all forms without being attached to a form?

I have several forms in my application, and I can initiate the call by some of them in partial execution for tests (not necessarily START by main form). In addition to the public variables that are in a module, I tried to do the same with rou...
asked by 12.12.2015 / 19:58
1
answer

How to drag some objects and forms in VBA / Excel and prevent the dragging of others?

I'm having trouble trying to control "dragging forms" and "dragging objects" in VBA / Excel. For example: I have the main form that I do not want to be moved, a second form is called from the main and can be moved, and I have certain objects...
asked by 08.12.2015 / 14:11
2
answers

Fill in value on the Internet page

So I want to put a value on a web page, but before that I log in and I'm directed to another page, there I navigate to a different page, and I took a look at the page code and where I want it put the information has the name part, at first it wou...
asked by 15.07.2015 / 18:57
1
answer

Problems with Error '9': subscript out of range

I am creating a customer registry, and every time I will debug when it arrives at: totaldelinhas = Worksheets("bancodedados").UsedRange.Rows.Count + 1 caixa_Localizar.RowSourceType = "bancodedados!a2:a90" & totaldelinhas It's a mistake,...
asked by 29.04.2015 / 15:39
1
answer

Find directory using wildcards

How do I find a folder as if it were a file? For example, the code to find the TESTE.TXT file is: b = dir("c:\minhapasta\t*.*xt") msgbox b But for folders the asterisk does not work. What alternative do we have?     
asked by 01.05.2015 / 16:36
1
answer

VBA does not recognize values

I'm trying to get date-type values from a given excel cell, however, my macro does not recognize cell values even though it's filled (date). Remember that there are three sheets. With Worksheets("TEMP") ActiveWorkbook.Sheets("TEMP").Act...
asked by 28.01.2015 / 18:03
2
answers

Security Message on ActiveX Control

System: Windows 8 and Microsoft Office 2013 I am having problems with an alert screen about ActiveX control that has been disturbing me for some time: Before opening the Form where the Windows Media Player control is, a warning screen with...
asked by 28.02.2015 / 02:11