Apply Formula To All Used Range

I am getting a Type mismatch error whenever I try to run this syntax. Essentially all I want to do is apply the formula to column A of the entire used range. What should I change so this executes as desired? Dim wSheet As Worksheet: Set wSh...
more »

2017-04-22 21:04 (1) Answers

Excel macro apply a formula but don't evaluate it

I want to use my macro to apply a simple formula to every row of my sheet at column R, evaluating the corresponging cell in column C The formula is simply: =YEAR(C2) when C2 will be updated into C3, C4... in the correct row. The line in the macro ...
more »

2017-04-22 18:04 (1) Answers

VBA Macro to delete rows to a default table size

I have a macro that will add lines as the second to bottom row of a table gets filled up but i want to add a second macro to resize the table to 12 rows and 11 columns when the table is over 12 rows and there is no data in the additional rows. Here...
more »

2017-04-22 02:04 (1) Answers

Getting File Location and Name for Excel VBA

I am creating a VBA program that will copy one column from one file to another. The current code works, but I wish to change it to where a prompt will come up and ask the user for the file location and name / extension. That input will be imported a...
more »

2017-04-21 21:04 (1) Answers

Ms Access Data Macro Call VBA Function Out of Box

I am using a Data Macro for one of my Access table's After Insert event. Inside this Data Macro, I am using SetLocalVar to call one of my functions written in vba to insert the same inserted record set into my SQL Database. It works when I enter da...
more »

2017-04-21 19:04 (1) Answers

How to sort Legend of a chart in VBA

I was trying to sort my legend and could not find any reliable answer. Here, Reordering Chart Data Series in Excel, you can find out how to do it manually. Also, a code was posted there, which was not working for me and it was too complicated for a ...
more »

2017-04-21 17:04 (1) Answers

Delete sheet in excel that I can't access

I'm trying to delete a sheet that for some reason I cannot access. It crashes Excel every time I want to access it. I'm using the following macro to delete sheets that are unwanted on closing (all sheets that starts with "SHEET") are being deleted on...
more »

2017-04-21 17:04 (3) Answers

Reading a file path in VBA

I am very new at VBA and have tried searching the questions for this but with no luck. I have a workbook that lists the file path in A1, workbook name in B1, and tab names in C1 & D1. I am try to write a macro that will open a file from cell A1, ...
more »

2017-04-21 16:04 (1) Answers

Customize ActiveX button from VBA

I've made a piece of code that, when you click a button, copies a sheet, strips it for formatting and then adds a new button with a different macro assigned to it. My problem is that both of my buttons are grey, and I would like to customize them. ...
more »

2017-04-21 14:04 (1) Answers

VBA Code Performance Issue

I am using a VBA macro to insert a column whereby it searches for a text character in column A. My code runs correctly. However, the file appears like it is going to crash. I will be building on the macro and want it to run smoothly. Is there a way ...
more »

2017-04-21 12:04 (2) Answers

VBA Else without if error

I keep getting the " Else without if" error in VBA when I clearly do not have that issue. Does anyone know how to fix it? It takes me to the elseif statement that begins with elseif memb= "platinum" Below is my code: ElseIf memb = "Platinum" Then ...
more »

2017-04-21 09:04 (2) Answers

Copy Excel Table Paste to Specific PPT Slide

Details: Mac Excel (2016) copying to Mac PPT (2016) Eventually, I would like to loop through all tables and paste each table on its own individual slide in PPT. But first I'm trying to simply copy one table from Excel and paste to a Specific PPT F...
more »

2017-04-21 07:04 (1) Answers

Save pdf attachment using a field from the pdf

The code below finds my Subfolder from my Inbox then opens the email in the active window. I would like to "Open" the pdf form attached to this email so I could save the attachment using one of the text fields from the pdf form. The only code I can...
more »

2017-04-20 22:04 (1) Answers

Remove all macros from a visio 2013 file

I have a Viso 2013 .vstm file that launches a VBA macro on document creation (template instanciation when a user opens the template manually). This macro populates the created drawing from a datasource. When finished, I would like to save programatic...
more »

2017-04-20 17:04 (0) Answers

Inserting NULL values in a database from VBA code

I have 3 radioButtons ("YES", "NO", "UNKNOWN") wich matches a column from my database with 3 possible values (1, 0, NULL). When the radioButton selected is "UNKNOWN" I want to insert a NULL value in this table (using Variant type). But when I try t...
more »

2017-04-20 16:04 (2) Answers

Saving Sheet as .CSV file

I have to copy the data and paste it in new sheet and change the sheet name as per user requirement and save it with the same name in desired location.I have written the code and executed but I cannot find the file in specified location.Please help m...
more »

2017-04-20 12:04 (1) Answers

Delete all worksheets after X amount of sheets

My code below should delete all sheets, from 6 onwards, however many there may be, when this button is pressed. It works, however I am getting 'Delete Method of Worksheet class failed' error afterwards Private Sub UnloadButton_Click() Do Wh...
more »

2017-04-20 12:04 (2) Answers

Lock empty cells and unlock free cells

Error MessageI am new to Excel and I am trying to write code that locks empty cells and unlocks the ones with values, any help will be highly appreciated. This is what I have and it is giving me Run-time error '1004': Method 'Range of object'_Gl...
more »

2017-04-20 08:04 (1) Answers

Visual Basic "COM Class" counterpart in C#?

We are trying to develop a Plugin for an application, and have unfortunately not received any actual instruction on what to use, how to use, and what is available for the development API. So far our direction has been "Can be developed in VB and C#",...
more »

2017-04-20 02:04 (1) Answers

select column once it is added

It adds a new column from a template of another page so formulas and formatting are copied in. It adds in 1 column before the last column. Last column is being used an an anchor. I would like it to select and goto the myCol & "5" but i am unable ...
more »

2017-04-20 01:04 (1) Answers