Questions tagged as 'vba'

1
answer

Copy to a specific character. Excel and visual basic

I am working on a program using VB and EXCEL. Currently I have to copy certain information from one cell to another to generate a report. Everything is working well for now. But I have the following doubt. One of the lines, contains the histo...
asked by 04.09.2017 / 16:51
1
answer

how to save an excel range to acces with this code

I have this excel vba code Dim cs As String Dim sPath As String Dim sql As String Dim sql2 As String Dim cn As ADODB.Connection sPath = ThisWorkbook.Path & "\datos.accdb" cs = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & sPath &...
asked by 30.05.2017 / 17:03
5
answers

Problem with date format when transcribing it to a box with VBA - Excel

I am working on a macro in which through a form and a text box called fechasolicitudreq . I'm saving the dates in the corresponding cells. I have tried the following formats: Cells(i,j).Value = Me.fechasolicitudreq.Value...
asked by 13.01.2017 / 16:09
2
answers

Can I do a counter in macros that registers me accounts times a macro is executed?

I would like to know if you can do a counter or a boolean that changes every time a macro is executed, since I need to make a conditional that validates if a macro was executed to perform a certain action. note: the counter will be used in a...
asked by 14.09.2016 / 21:27
2
answers

KeyPress to close a form

I try to make some forms close by pressing 'Esc', using Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If KeyAscii = 27 Then Unload Me End Sub But it does not work. Neither with KeyDown or KeyUp ....
asked by 22.12.2016 / 09:53
1
answer

How to automate the login in a web

I have a problem that I have not yet found the solution, I recently registered on a website and I set out to create an automatic login with excel macros. Everything seems to work, but I can not fill in the requested fields and therefore does not...
asked by 23.12.2018 / 15:06
1
answer

How to insert a new row with data in an Excel spreadsheet

I am looking for help in a code that is complicating me a lot since I must use (at least I think so) the Range method. Find , which I have not managed to know how it works. What I need is a code with which you can enter new blank rows in an...
asked by 11.07.2018 / 17:40
1
answer

Multiply two variables that contain ranges

I am trying to multiply two variables (be ContractsQty and LeaseQty ) to get the total of lines that have to be created. I'm trying to use something like this: 'Calcular cantidad de lineas Dim ContractsQty As Range Set Contract...
asked by 16.01.2018 / 20:46
2
answers

Loop do while in vba

I have made a module that according to what number you enter with the conditional if, I get a message or another. I have created a repetition with the loop do ... loop, so that I only introduce from 1 to three and if I do not ask for it again...
asked by 22.08.2017 / 17:33
1
answer

Create a new window with XtraTabPage like the previous one Help please!

I want to create an object of a XtraTabPage that is equal to one that I already have that is to say that it has the same controls, this code allows me to create a new XtraTabPage but empty Public Class Consultas Private Sub b...
asked by 15.04.2016 / 00:40