Questions tagged as 'vba'

1
answer

Parameterizing travel counts in a select VBA routine

I would like to get the following select , so I'll provide the example below, remembering that I use Access 2007 VBA. Objective : Count the trips made by the fleet vehicles by Line / Sense. Taking into consideration the following param...
asked by 02.04.2014 / 00:03
0
answers

Recursive errors generating a word file from the fields of an Excel worksheet (VBA)

Good afternoon, I never programmed in VBA but I found myself in a need where I need to generate a word document from some cells of a worksheet in excel, after searching several websites on the internet I was able to make a script that works, the...
asked by 28.11.2018 / 17:28
1
answer

Specify last line for form filling - VBA

I am making a form and I want the person to only register 6x (only 6 lines) the content. How to limit this amount? Asaboveexample,IputtherowsandcolumnsandwhenIfilltheform,newnumbersaregoingdownPrivateSubCmdSalvar_Click()DimLinhaAsInteger'Val...
asked by 23.11.2018 / 19:09
1
answer

Limit FormulaArray

Range("B11").Select Dim Rmts As String Dim Busca As String Rmts = "C:\Users\Treinamento\Desktop\Trabalho em vba\BC\[Relacionamentos.xlsx]Matriz_Trein_Obrigatórios" Busca = "'!R8C6:R394C34=Busca!R8C2,ROW('" Range("B11:B450").FormulaArray = _ "=I...
asked by 20.09.2018 / 07:20
0
answers

Access - saving data

I have the VBA code below that saves a new post. Closing the Form, even if I have typed any name, it is not saved. But I noticed that Access automatically generates a new primary key, ie it skips a primary key that will no longer be used. Exampl...
asked by 22.08.2018 / 02:48
0
answers

Iterate XML with VBA and pass data to cells

I am now starting to mess with VBA and I have the following problem: I was able to make a code that makes a SOAP request for a webservice and returns me an XML with the electronic point marking data of a person. So far the code works quietly....
asked by 17.07.2018 / 23:36
0
answers

Questions about objects in Excel vba

I'm working with vba now, but it's a language I had little contact with at the undergraduate level, I'd like to ask some questions. When a macro in an excel file calls another excel file that also has macro that was closed there is no error,...
asked by 20.06.2018 / 18:13
1
answer

Problem Set InvokePattern = Button.GetCurrentPattern (UIA_InvokePatternId) - vba

Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Declare PtrSafe Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal lpStrin...
asked by 19.06.2018 / 16:12
1
answer

Excel and SQL - Connection between Excel file

I have the (final) code I got on the internet. In this line of code it gives error in WHERE, since it is a text: strSQL = " SELECT [VENDAS$].[Data], [VENDAS$].[Vendedor], [VENDAS$].[Total]" & _ " FROM [VENDAS$] WHERE [VENDAS$].[Vendedor] =...
asked by 07.07.2018 / 22:12
1
answer

Identify the ID / Number of each Text Box Shape

I started using VBA for powerpoint and needed to start referenceing my code to each Shape within the presentation. But I do not know the name of each Shape to reference. How do I know that a text box is shape (1), shape (2), or shape (40). De...
asked by 30.05.2018 / 22:58