Questions tagged [vba]

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

0 votes
0 answers
14 views

VBA Code to highlight selected cells (it could be a contiguous range in a filtered column, so this is variable) [duplicate]

I'm banging my head against a wall regarding the following VBA code as I am a novice. I want to be able to highlight only selected cells. This could be either by manually selecting non-contiguous ...
user avatar
0 votes
0 answers
24 views

Run-Time Error 1004: Text To Columns Method of Range Class Failed

I have been working on this since yesterday. I am trying to create a macro, I have tried numerous methods, however I keep getting the error message 'Run-time error '1004': TextToColumns method of ...
user avatar
0 votes
0 answers
24 views

Calculate the number of workdays between two dates in HOURS

I have a code that I found on microsoft website : Function Work_Days(BegDate As Variant, EndDate As Variant) As Integer Dim WholeWeeks As Variant Dim DateCnt As Variant Dim EndDays As Integer ...
user avatar
-2 votes
0 answers
13 views

Excel VBA macro for converting text to numbers [duplicate]

I'm new to VBA and so this might be an easy one. I notice that Excel "sometimes" shows a little green triangle in the top left corner as seen in the picture below to indicate numbers stored ...
user avatar
0 votes
2 answers
26 views

Making a function with mutually exclusive pre defined argument list

I know what an optional argument list is and how to set default vales. Public Function argTest(arg1 As String, Optional arg2 As String = "TEST", Optional arg3 As String = "TEST") ...
user avatar
0 votes
0 answers
19 views

VBA code to hide Menu, Scrollbar and etc... running in every workbook i open

I have a VBA code to hide Menu, Toolbars, Scrollbars and etc, its currently aplied on "ThisWokbook" not a Module, so that code run everytime i open the Workbook ( HAHA1.xlsm ) My Code ...
user avatar
  • 55
1 vote
1 answer
30 views

MS Access VBA code in continuous form not working while a subform

Good afternoon, I'm running into an issue with some code. Basically I have a subform attached to a question and answer table. The subform displays the question and the button displays the answer. This ...
user avatar
-2 votes
0 answers
49 views

Perform over 1M calculations in excel [closed]

What is the best way to over a million averageifs operation in less than 5 mins. I have data in 3 tables and I've tried VBA but the speed is much slower. Please suggest a tool for this calculation ...
user avatar
0 votes
0 answers
27 views

Retrieve a URL from an open webpage

I am running an Excel worksheet alongside an open webpage. I navigate to the webpages independently from Excel. Once I get to a page I am interested in, I want to run a macro in Excel to retrieve ...
user avatar
0 votes
1 answer
27 views

Issues with replacing bookmarked data

I recently asked a similar question but thanks to a comment I have made some updates. However, I am running into some issues. I am attempting to use Word bookmarks in a "template" to auto-...
user avatar
  • 115
1 vote
1 answer
25 views

Table Filter greater than and blanks at the same time

I currently have an excel table which I want to filter with 2 Criteria simultaneously. I want the table to be presented with a ">=" Criteria and with a "<>" Criteria in ...
user avatar
1 vote
1 answer
24 views

Copying over certain cells from multiple columns

my goal is to copy cells in a dynamic range from Column B to S to another sheet if they are non zero. Additionally, would like to move the cells up to the top of the next sheet (Without having to ...
user avatar
  • 31
-1 votes
0 answers
17 views

Link a lot of cells in excel to some table in a word document

Can anyone help? :( I have to link a lot of cells in excel to some tables in a word document using (special paste, link, unformatted text) The task required by the boss is to enable a report in word ...
user avatar
  • 1
0 votes
0 answers
26 views

Change the font of an automatic e-mail [closed]

how can I do to change the font of an automatic e-mail generated by excel VBA? here follows the code...I suppose that I have to add something in the "With"
user avatar
  • 1
1 vote
0 answers
35 views

Microsoft Visual Basic Error 6 Overflow in VBA

I'm writing a small program in vba. everything seems fine but before the calculations, the "error 6: overflow" occurs. Any ideas? Sub capital_tax() 'input Dim status, invest, ans As ...
user avatar

15 30 50 per page
1
2 3 4 5
13490