EXCEL-VBA (Visual Basic for Applications for MS-Excel) is the dominant programming language for Microsoft Office Excel.
0
votes
0answers
10 views
Trying to normalise data (I think!)
I hope someone here can help me with something I am really struggling with! Trying to get my head around macros/VBA's etc with little success! I am looking to normalise data (i think!). I have a ...
0
votes
0answers
5 views
How to Delete Fileterd DATA using macro
Please solve :
I have workbook name "Dashboard" and "Not Require" and save on same location. Now Dashboard workbook is only active and I have to do below with using Macro :
1. Fist I have to open ...
0
votes
0answers
8 views
Errorbars formating in Excel 2007
Using a macro in excel 2007 I want to display the following errorbars:
No horizontal errorbar.
Red dashed with 100 plus value vertical errorbar.
I can get everything I want except the color and I ...
1
vote
1answer
14 views
VBA With obj - how to reference the obj inside the With without naming it?
If I am inside a With block that is referencing the object I want to reference for a function call for example , must I reference the object by name or is there a "this" ,"me" ref that I can use?
...
1
vote
0answers
10 views
How to create a html syntax TEXT / PHP file from an Excel Spreadsheet using VBA?
How can I create a text output from an excel spreadsheet with html syntax? I'm trying to create a html page menu with php. But I need some kind of easy creation of the menu, so that in case of the ...
0
votes
1answer
19 views
VBA Excel - Simplifiying For To function IF statements
I have a Combo Box (GSMListType) with different variables "A", "A - K", "B", "C", etc... linked to a List Box (AvailableNumberList) which calls on cells from different sheets based on the selection in ...
0
votes
1answer
21 views
Conditionally copy cells to new workbook
I haven't worked with VBA for a while and here's what I'm trying to do: I have a worksheet with a column of ID numbers, and then a bunch of columns that make reference to whether the person with that ...
0
votes
1answer
15 views
VBA Code 64-bit Systems
I am getting an error that my code needs to be updated for Office 64-bit systems. I can't understand what changes need to be made as this works fine on Office 32-bit.
Private Declare Function ...
0
votes
0answers
16 views
How to create event replicating changes in predefined sheets to other workbooks?
I have many workbooks with some of them having the same sheets. I am wondering if I can create event replicating changes from one sheet to the same sheet in many other workbooks in predefined ...
-1
votes
1answer
17 views
Excel VBA reference a macro variable inside quotes
I'm trying to reference a string macro variable insude quotes.
Here's what I have. Why couldn't it just be &state. Arrrggg!
Thanks
Dim state As String
state = "AK"
Workbooks.Open Filename:= _
...
1
vote
1answer
16 views
Excel VBA to send data to webpage that runs javascript - HOW?
I have a webpage that we have as a tool, where we(user) have to input few data, then we click submit and we obtain some calculated result in next page and this webpage is used internal to our company ...
0
votes
0answers
24 views
Whole screen is coated with a blank Excel Sheet, without rows and columns
In Excel VBA , In the main program , have one in great UserForm with all my work, and with one less UserForm in specific position, I want to get an answer to any question. Also, without showing,, I ...
1
vote
1answer
27 views
Using VLOOKUP to search different sheets
I am trying to search if a number exists in one of the 32 sheets I have in my workbook.
I have tried to use the below mentioned code but it's not working because VLOOKUP is not deciphering the ...
0
votes
0answers
13 views
trigger worksheet change event for a cell in excel using apache poi hssf
I have one excel file in which a cell has data validation list. When we change value of the cell selecting a value from the validation list some other cells values are populated because those other ...
0
votes
1answer
26 views
“Constant Expression required” error in VBA
I am new to VBA and I am trying to write a simple program that copies a sheet to another sheet and then pastes it with some of the rows selectively deleted. As part of my program I am trying to simply ...
2
votes
2answers
20 views
Duplicate Worksheets with New Names
Would greatly appreciate your help in figuring out this small issue.
I want to duplicate an excel worksheet multiple times with the name i want it to be. I was able to do it by having it ask me what ...
-1
votes
1answer
18 views
Excel VBA set the BuiltinDocumentProperties for Comments to Read only [on hold]
How can I set the BuiltinDocumentProperties Comments of an Excel file to Read only after updating the comments in the VBA code. The user is not expected to edit the file description>comments of the ...
0
votes
0answers
21 views
ListBox_Change event suppressing ListBox.Clear method
This is related to an earlier post (Run Time Error '380' on ListBox). However, after extensive rework, I still have the same type of issue but I now have a better understating of the real cause, ...
0
votes
0answers
39 views
Link Excel worksheets to each other so that changes in one are mapped to the other
So I have a stock portfolio that I have subdivided into three thematic categories. Every month I update each of these categories to reflect new positions added by copying the sheets from the ...
1
vote
1answer
20 views
code for communicating between a table workbook and a function workbook in excel -the aftermath
A couple of days ago I posted a question in order to find out how i could write a code that let me communicate between a function workbook and a input/table workbook. I was graciously helped by ...
1
vote
0answers
59 views
Why all elements in my array are the same?
I have a function to create array dynamically, however the elements in array created are all the same. All elements are overwritten by the last one.
Is this an VBA issue or any where I am doing ...
0
votes
0answers
17 views
How to check security of PDF file from excel?
Using Acrobat.tlb reference I am trying to check, if PDF file is secured / has any restrictions set.
I checked Acrobat JavaScript Scripting Reference, but I am doing something wrong:
Sub ...
2
votes
1answer
14 views
How to Find the name of the last opened workbook
In Excel 2013, you just do it by going to File > open > Recent Workbooks > choose the first in the list.
But can this be done by code ?
Seems easy enough to do, but i didn't find any clue, here or on ...
1
vote
2answers
28 views
VBA Excel 2013 Copy certain information from one worksheet to anther worksheet - weekly reports
I'm super new to VBA and hope that someone can help. This is what I have so far:
Public Sub Late()
Dim LastRow As Long
Dim MasterLastRow As Integer
Dim NewRange As Range
Dim ...
0
votes
1answer
20 views
Excel VBA .find command not working for me
I have an Excel 2013 sheet that has lots of tabs. Each tab holds license keys for a different piece of software that our company has. The License is then tied to the Computer it is installed on. I ...
2
votes
1answer
15 views
attach multiple files to send in email or entire directory (VBA)
I'm tring to send an email with multiple attachments via VBA and outlook. The code I have works if I specify the path to one attachment/file and I can also add multiple attachments if I know exactly ...
0
votes
0answers
40 views
How to keep a shell window open for the lifespan of a workbook
I can call a script in R from VBA by doing
Sub CallRScript()
Dim myShell As Object
Set myShell = VBA.CreateObject("WScript.Shell")
Dim waitTillComplete As Boolean, style As Integer, ...
1
vote
1answer
33 views
Compare value of cell in vba
I am trying to compare the value of a cell (always a number) to the iteration variable in a for loop but for some reason vba says this is an invalid call or argument. I am new to vba so any help ...
1
vote
1answer
42 views
How to paste values in a certain text position in VBA?
I have a workbook with 2 sheets. First sheet contains table with data to copy, the second sheet contains strings inside which i would like to insert copped data.
The problem is that i don't know how ...
0
votes
1answer
23 views
Reference a cell from another worksheet
I have two worksheets 'Sheet A' and 'Sheet B' (note the space in the sheet name) in my excel workbook. The requirement is that I need to use values from cells in 'Sheet A', in 'Sheet B'.
The macro ...
-2
votes
1answer
38 views
I need to add/remove columns and rows with a couple of spin buttons
I have a workbook with a sheet that has a few places to input parameters (number of samples, number of measurements, part number, etc.), and a button that will create a data sheet based on the inputs. ...
0
votes
2answers
18 views
VBA 1004 Error when trying to parse scrapped data
I got 2 questions:
I have 4000 rows of scraped data from a website, I am trying to clean up and get the relevant data (from columns B-G) from all non empty rows.
This code produces a 1004 runtime ...
0
votes
0answers
11 views
Resize pivot chart when selecting different less/more values
When creating the pivot chart using VBA, I set the size of the chart depending on the number of different values that I have in the chart. With pivot charts you have the option to select only some ...
0
votes
3answers
24 views
Saving excel worksheet to CSV with file name from a cell using a macro
i have a macro that saves a copy of my workbook that works but it saves as a .xlsm
and i need it to be saved as a comma delimited .csv file type
can any one help me?
here is the macro i have now
...
0
votes
1answer
24 views
Extract data into new workbook based on value in excel
I want to extract data from one speadsheet to another based on value of a particular cell.
I want to extract data to a new workbook based on Product. For example, Data for all the customer who ...
-2
votes
2answers
32 views
how to add multiple items to a key in vba
i'm new to vba and i was trying to make a program to do add multiple items to a key.
Eg:
Table
Name Date Time
XYZ 20 4
ABC 21 ...
0
votes
1answer
15 views
Comparing and extracting Rows
In my Workbook I have a number of sheets containing customer data. These sheets where extracted from a very large set of Master data and are split based on factors such as the record missing an email ...
-1
votes
1answer
19 views
Looping Excel Macro
I'm not overly familiar with macros on Excel VBA, so was looking for some help on the following:
Creating a template where the user will enter an unlimited number of products and users, creating a ...
2
votes
3answers
38 views
Multiple Objects In With Statement
I'm wondering why this simple code throws a "Object Required" error when I attempt to run it. I can't really find any reason why VBA would have trouble andling this. It compiles OK, but fails to run.
...
-2
votes
1answer
19 views
How to delete rows based on condition in VBA? [duplicate]
I have a table, where in C column are numeric values sorted from max to min. If C column values are > 40, the macro deletes an entire table row. I'm using following macro:
Sub DeleteRowsPiuDi40Mega()
...
1
vote
1answer
11 views
Restricting SpinButtons to specific Min and Max values VBA
I am trying to restrict user to select value between a limit using SpinButton in VBA but its not working for me
Here is what I have tried
Private Sub UserForm_Initialize()
decimalSpin_Button.Min ...
1
vote
1answer
15 views
Excel VBA: Searching for value in listbox based on value set in textbox
I am trying to write a code for a search button which searches a listbox based a specific input set in a textbox.
The values searched are always numbers, and the listbox contains values from a single ...
-3
votes
0answers
17 views
how to edit and update the data using vba?
I am working with excel vba program.I already have the codes that can add new data and save it to sheet1 in the same workbook that will display in the list view.What i want to do now is when i double ...
-1
votes
2answers
63 views
What mistake is in the code since does not work
In my Excel workbook, 14 columns are there C to P with range C1:P200 Row 1 contains time value. Example: C1=9/27/2014 8:42:34 AM; D1=9/27/2014 9:12:25 AM & so on...till P1.
Output required: ...
-4
votes
0answers
36 views
excel vba pastes formula as text and not formula
I have VBA procedure which pastes formulas into a worksheet range. The code works, but the formulas are pasted as strings and not formulas - the formulas are 'inactive'. I then replace '=' with '=' ...
0
votes
0answers
22 views
Losing state of Excel App when error occurs in code
I have designed an excel addin which has a class "CExcelEvents" with the below code. The intention is on everytime a workbook deactivates, it refreshes the entire addin-ribbon (custom excel ribbon ...
0
votes
1answer
34 views
Excel / VBA: How to set FormatCondition.NumberFormat to the special Variant value “Empty”?
When I create a new conditional format in Excel manually (using the standard dialogs), the default NumberFormat is unset. This implies: "Do not override the number format when applying a conditional ...
0
votes
2answers
21 views
How to use case structure for comparing string
So i have a table in excel with different names. I am trying to parse through the table and depending on the name in each cell, change the cell background color.
I tried to use a switch control, but ...
0
votes
2answers
30 views
Shouldn't Excel support passing off-sheet cell range references to functions?
You would think so but this fails with a 1004 error
Rem This macro is running on sheet2
Dim avg As double
Names.Add Name:="sheet1Avg", RefersTo:="sheet1!$C$2:$C$24"
avg = ...
-5
votes
0answers
25 views
Locking Multiple Ranges on a worksheet [on hold]
Is it possible to lock multiple ranges on a worksheet with vba? If so how would I go about doing it? Thank you.