How are we doing? Please help us improve Stack Overflow. Take our short survey

Questions tagged [vba]

Lô đề online 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].

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Writing a macro to import a CSV into an Excel template

I am trying to write a macro for an excel template for some data analysis. I want it to import a csv called "Raw Data.csv" found in the same folder as the macro workbook so that the csv with ...
-3
votes
0answers
11 views

VBA Code to count number of clicks on different commandbutton on a single userform

I am wrting this mail to get help from expert here. Actually I am planning to create a new game in which there are 16 command buttons and to complete the game all the command buttons need to be ...
0
votes
0answers
8 views

Change data label format in PowerPoint Charts

I have a PPT-Presentation with a number of charts. Each chart has data labels. These data labels are formated ##.##. I am trying to change it to ##.0 via VBA. Here is what I do: Sub Format_Datalabels()...
0
votes
0answers
8 views

TempVars to save record ID for opening a subform

I am currently getting "Run-time error '-2146500594 (800f000e)': Method 'Form' of object'_SubForm' failed" when I run the following code: TempVars.Add "TempFlightID", Me![...
-4
votes
0answers
16 views

How to refresh excel external data automatically with vb macros? [closed]

I have an excel file that have pivot tables that connect to power bi data. I can refresh manually on there but I want to have a way to automatically refresh once a day. I want it to open the file in ...
0
votes
0answers
16 views

LongPointer to String

I'm calling CredUnPackAuthenticationBuffer as per this question: Public Declare PtrSafe Function CredUnPackAuthenticationBuffer Lib "credui" Alias "CredUnPackAuthenticationBufferW" ...
-1
votes
0answers
18 views

get reference of cell adjacent to active cell

So I am trying to combine the data of two adjacent cells into the next adjacent column. I want to give the reference of one active cell and second one will be the Hardcode reference. And after that It ...
-4
votes
0answers
19 views

i have an excel file with table of values. I need to find all cells with name and lower mark in row and other rows with the sam [closed]

i have an excel file with table of values. I need to find all cells with name and lower marks in row and other rows with the same name and higher mark must be removed. Can i use bulid in excel vba or ...
0
votes
0answers
22 views

Excel - Intersection point of lines [closed]

I want to find the intersection of two lines. I have two points for the first line: A(x1,y1) B(x2,y2) and other two points for the second line: C(x3,y3) D(x4,y4). Is there an Excel formula that I can ...
-1
votes
0answers
16 views

invalid forward reference or reference to uncompiled type

I have an Excel Macro that has been working for months without any issue. It selects another tab, where it looks at data coming from a MySQL database. Suddenly today I get : invalid forward reference ...
0
votes
1answer
22 views

Ptrsafe for 32 and 64bit

OK.. Complete novice and probably too old to even comprehend some of this! I need to following to be compatible with 32bit and 64bit, I know I need to use PtrSafe and change long to long ptr but no ...
-1
votes
0answers
20 views

I want to print ListBox filtered data

I made lisbox in userform excel and made textbox to filter specific data. I want to print that data from listbox . Private Sub TXTCODE_Change() Dim rw Dim strText As String strText = LCase(TXTCODE....
0
votes
0answers
12 views

Execute macro in Excel (location of dbo.names) to import 3 tables from SQL database into a new Access file

I am attempting to consolidate a tool developed for actuarial function. Currently the tool imports tables from our sql database and does some calculations on the tables then spits them out into a ...
-4
votes
0answers
24 views

Bond valuation in VBA [closed]

i am new to vba and i need your help. I tried to write a bond valuation code in vba but i couldn't make it. I need to have two tabs, one for data input (maturity date, settlement date, face value, ...
0
votes
0answers
11 views

Outlook array index out of bounds when trying to display MailItem after MailItem.Attachments.Add has failed

I'm calling Outlook from an Excel VBA macro to send an attachment via email. If for some reason an attachment cannot be added to the MailItem, I get the "Array index out of bounds" error ...

15 30 50 per page
1
2 3 4 5
12065