Questions tagged [vba6]

Visual Basic for Applications (VBA) is an event-driven, object-oriented programming language for writing macros, used for the MS Office suite as well as other applications. VBA is not equivalent to VBA6, VBA7, VB.NET, or VBS. If your question is specifically about programming any MS Office application, also use the appropriate tag: [excel], [ms-access], [ms-word], [outlook], [powerpoint] or [ms-project].

Visual Basic for Applications (VBA) is an event-driven programming language which was first introduced by Microsoft in 1993 to give Excel 5.0 a more robust object-oriented language for writing macros and automating the use of Excel. The language and its runtime quickly matured and began being used in products beyond Microsoft Office applications.

Differences between VBA 6.0 and VBA 7.0?

There's not a whole lot that has changed between VBA6 and VBA7. VBA7 was introduced to support 64-bit versions of both Office and Windows while VBA6 only supports the 32-bit versions of Office.

Reference

Differences between VBA 6.0 and VBA 7.0

139 questions
0
votes
0 answers

Add rows based on break dates with VBA

I have a database that shows exposure indicators at a monthly rate with dates that showcase break dates for each client individually. For formatting reasons, I've been asked to show the break dates by adding rows with the same client info but having…
lirbu1
  • 1
  • 2
0
votes
0 answers

How do I edit a recordset if it already exists and add a recordset if there isn't one yet in vba?

I'm working on a project for school where I'm using a form to add/edit records in an Access database table. AccountID is the Primary Key used to link different tables, so I can't have duplicates of it. The AccountIDs are in a drop down list box on…
0
votes
0 answers

VBA function triggered by event change is going haywire

I am creating my own sports coding application on Excel. I am using 7 consecutive dropdowns lists within a single column to select a roster of players in each a match. I have created a macros that concatenates the players name and playing position…
0
votes
1 answer

Line Continuation on VBA, SQL statement

I'm trying to do line continuation on vb and i getting an error, here is my code sql = "Insert into RECRUITMENT values (" JobID ",'"Department"', "Employment_Level",'"Line_Manager"', '"New_vacancy_or_Replacement"', '"Recruiter"','"Position_Status"',…
0
votes
1 answer

VBA Problem error 91 - Azure Virtual Desktop

We use our excel reports in our virtual desktop. Now we are testing with our reports in Azure Virtual Desktop and there's a excel report coming out of a error: Cells.Find(What:="zzz", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart,…
0
votes
2 answers

VBA split Multiple sheets After a particular sheet (Issue)

i had found fews lines of code online where 1: filter data from "Mst SKU" 2: split the data into different multiple sheets 3: sheet should be added before "All_total" step 1 and 2 are working good but step 3 the sheets are added after last worksheet…
0
votes
1 answer

VBA function: Compile Error: Argument not optional

Sub Test_Run() MkDir "C:\ST\temp\AM" End Sub I am trying to create a new folder (AM) in an already existing directory which is C:\ST\temp. But it's causing error showing message: Argument not optional
0
votes
1 answer

How to make words following an equal sign turn into A-Dash-Dash in Word VBA?

I need a Word Macro to convert selection text from this: This is a =selection in a word =document. To this: This is a s________ in a word d_______. Can anyone help me out? I've tried Sub conv_1() Dim Sentence As String Dim i As…
Tim Li
  • 7
  • 3
0
votes
0 answers

Problem with inserting data in a new Row in VBA using user-form

As vba learner,I have designed a simple code for VBA. I have 3 columns- Parent Job, Child Job , and Details. Under parent jobs, I have a number of child jobs. For each parent job in the first column, I am trying to insert all its child jobs in the…
0
votes
0 answers

copy a column from one Worksheet to another with header name vba

I am trying to copy certain columns from one Excel-Worksheet to another. But since the Columnnumber can change it would need to be done with the name of the header. The code i tried did just nothing. If anyone knows how i could get my code working…
eric
  • 1
0
votes
1 answer

VBA Macro accepting spelling suggestions and removing repeated words

I'm trying to write a VBA macro that accepts all spelling suggestions. I've got this long automatic transcriptions full of things like repeated words. For some reason with MS Word Editor does not have an accept all function. This is what I'm working…
Johanna
  • 109
  • 8
0
votes
0 answers

Send email from non default gmail account

How can I send email from a non default gmail account? I have used .from but it is still sending from the default gmail account. The code I've used is below: **Sub sendemail_() 'For Early Binding, enable Tools > References > Microsoft CDO for…
0
votes
0 answers

Script to connect to SAP

I am making a Userform with several Optionbuttons, to generate different SAP reports automatically. According to the user's selection, a specific report is generated. But I notice that I am repeating the SAP connection code multiple times (for each…
0
votes
1 answer

How to activate a cell on Double Click on VBA(Excel)? Please assist me fix the code

I am designing a simple stock clock. The stopwatch starts once I click a cell. I want to do other stuffs in another cell while the clock is running. I have the start button shape as Macro(start function assigned) and the stop button shape as…
0
votes
1 answer

How to use a string as a variable to set ColumnWidth of individual columns?

I'm trying to refine the below code /commented out/ to something like the shorter script at the bottom. Using VBA6 as this is legacy code. Private Sub XLSetCol(xc1, xc2, xc3, xc4, xc5, xc6, xc7, xc8, xc9, xc10, xc11, xc12, xc13, xc14, xc15) '…