Questions tagged as 'vba'

1
answer

Is it possible to comment several lines at once in VBA?

There is the equivalent of /**/ of c # to comment and VBA instead of using plica in each row 'Function Prodcet30(a As Double, b As Double) As Double 'If a = 0 Then ' MsgBox ("Por favor introduza o valor a")...
asked by 27.06.2017 / 11:32
1
answer

Questions about VBA / Excel executable program generation

I compiled a VBA program that interacts with an Excel spreadsheet. After no more crashes pointed to when compiling, compilation is performed and no action is presented at the end. I did not find the executable program in any folder (if it was...
asked by 01.04.2016 / 02:53
4
answers

Dynamically setting the Excel column size

I'm working with the generation of spreadsheets in EXCEL, and for this I use the standard api of the framework. Imports Microsoft.Office.Interop.Excel However, when I have a column with very long text, the line is broken with each word or a...
asked by 23.04.2014 / 14:01
3
answers

VBA: Use Excel to rename files in a folder

I'm thinking of using Excel Visual Basic to standardize the name of 6000 files in a given folder. These files are mixed between photos and documents, so there are a variety of extensions (DOC, DOCX, PDF, TIF, TIFF, JPG, JPGEm BMP, PNG, MSG ...)....
asked by 06.04.2017 / 20:17
1
answer

Executing text as code in VBA

The code below calculates the formula contained in the Text (String) variable: Private Sub CalculeFormulaNoTexto() Dim Texto As String Texto = "= 90 / 3 + 7 + COS(0) + 1/7" ' A variável Texto recebe a fórmula que quero calcular ' Observe qu...
asked by 29.11.2015 / 20:19
3
answers

Excel - Extract only numeric fields from a selection containing texts and numbers

Using Excel, I need to extract numerical data from a selection. Example: Coluna 1 123 456 Bom Ruim 789 Ótimo From the above data, I need to extract the following data: Coluna 2 123 456 789     
asked by 05.10.2015 / 21:43
1
answer

Generate random number when activating worksheet in Excel

I am here because I believe that only with the help of VBA I will achieve what I intend to do, which is the following: I'm developing a small game in Excel and I have to use random numbers, so every time I load, remove, or write something, th...
asked by 27.11.2014 / 22:18
2
answers

VBA Set ie = CreateObject ("InternetExplorer.Application")

Next, I'm picking up VBA to navigate a web page (can be with Internet Explorer) I basically found some codes with the CreateObject("InternetExplorer.Application") method. But I can not input the fields using the object ID to be able to...
asked by 20.08.2014 / 03:13
1
answer

Macro email range + signature

Good morning. I need help with a macro for sending emails in Outlook 2007. I have a macro that selects a certain range of cells (everything to the right and everything down from a referenced cell) and pastes into an email, along with the i...
asked by 19.04.2018 / 16:07
1
answer

How to "concatenate" multiple values entered by a user into the table in a Msg box?

I'll try to summarize what I'm trying to do: I made a userform so that my user inserts data that will feed a table, it can put "n" information and the table will be formed according to the volume of data that it populates. After that, when...
asked by 03.05.2018 / 21:37