vba Questions

1

When I save my Excel file with VBA, it asks me to enter my credentials (it saves it on some kind of server). Looking though the website I found a way to use SendKeys and delay the action. My issue:...
Followthrough asked 15/10, 2019 at 8:0

4

Solved

I'm trying to write a text formed with Ascii Art.For example "Hi".It's hard for me, so I'm here asking your help.Here is what I'm do till now: Option Explicit ' I tried with a Type. Priv...
Tantalite asked 24/3, 2023 at 15:9

5

I created an Ms-Access userform which has a number of Textboxes. The boxes are named: Box1, Box2, Box3 ... I need to loop through all boxes, but I don't know which is the last one. To avoid looping...
Hasdrubal asked 30/5, 2017 at 8:25

6

Solved

I am building an MS Access application in which all the forms are modal. However, after data change in a form, I want to refresh the parent form of this form with newer data. Is there any way to do...
Mesentery asked 17/10, 2008 at 13:55

0

How could the below code be modified to create 3 columns such that column A contains unique HEX codes representing text colors (each cell in column A would contain the HEX code displayed in the res...

2

Solved

I would like to get a range of the first column from a larger range. For example: If the range is $E$9:$I$259, the result should be $E$9:$E259 How can I achieve this?
Keikokeil asked 12/4, 2013 at 14:45

3

Solved

Is there any way to check in VBA if a specific column of a table (ListObject) in Excel is a calculated column (as in https://support.microsoft.com/en-us/office/use-calculated-columns-in-an-excel-ta...
Puree asked 9/1, 2013 at 16:54

2

Solved

OK so, I know I can do this: Dim ws as worksheet Set ws = thisworkbook.worksheets("Sheet1") and then do my fancy stuff with the ws worksheet object I also know I can Dim wss as worksheets and t...
Robles asked 24/9, 2016 at 14:48

2

I have a set of linked subs which work like this: A user types into an ActiveX TextBox A Change Event in that TextBox calls a sub in a Module That Module sub drives updating a named range in a s...
Gruesome asked 26/1, 2015 at 14:51

2

Solved

In Excel, I have a VBA module called MyModule which has a function as such Public Function MyFunction(Param1 As Range, Param2 As Range) As String ' some implementation End Function At runtime...
Throes asked 7/1, 2013 at 17:0

2

I have this code in VBA that needs to be in Python. I'm new to Python, sorry for that. Sub cdec_test() Dim val1, val2, result1, result2, x1, x2 As Variant val = CDec(5930 / 3000) 'val1 : 1.97666666...
Peacetime asked 23/8 at 17:50

2

Solved

I was just curious if there might be a way to call functions dynamically. For example. Sub foo1() Debug.Print "in foo1" End Sub Sub foo2() Debug.Print "in foo2" End Sub Is there a way that I...
Avionics asked 7/11, 2013 at 20:24

4

This is my VBA code to create a scatter plot in Excel: Sub createmychart() Dim Chart1 As Chart Set Chart1 = Charts.Add With Chart1 .SetSourceData Source:=Sheets("usd_download data").Range("A2:...
Giana asked 3/8, 2015 at 3:1

7

Solved

I am converting a table into Pivot and then to a CSV file. I want to remove the subtotals of the pivot table. So far: this is my progress. MACRO CreatePivot: Sub CreatePivot() ' Creates a PivotT...
Citizen asked 11/6, 2014 at 19:18

2

Solved

How can I reference a cell in the same column in the previous visible row from a filtered range?
Commodus asked 12/3, 2015 at 18:2

3

I have a problem in VBA with a line throwing back an error. What the macro is intended to do is find a particular cell then paste data into it. The code is as following: 'To find Column of Cust...
Stratify asked 15/12, 2013 at 23:13

5

Solved

I'm trying to write a function in Excel that will set the background color of the active cell according to the values stored in other three cells (each of those three cells store a numeric value fr...
Governess asked 16/10, 2015 at 20:59

7

Solved

Is there any way to align text into the center in msgbox in VB or VBA? Does VB have any functionality to do the same?
Leavings asked 3/2, 2012 at 15:24

6

I have several named columns on a sheet. I want to send the column number to a function that will return the column name. For example, if column 1 is named "apple", I want to pass the column numbe...
Exarchate asked 11/2, 2016 at 21:56

7

Solved

I want to create a Sub that basically allows me to target an Excel table with a specific name and then insert a new row at the bottom and add data to that row at the same time. Then exit the sub. A...
Timothee asked 28/11, 2011 at 11:39

9

Solved

I have an Excel 2010 spreadsheet with links to external data sources including Bloomberg, 65 worksheets with VBA modules and references to other VBA add-ins. The VBA project has acquired multiple W...
Sesqui asked 16/8, 2013 at 12:11

2

Solved

I have this simple formula in Cell A1 =10*Round(B1/10,0) I know how to enter this in VBA, i simply write: Range("A1").Formula = "=10*Round(B1/10,0)" Now, what if I don't know ...
Sacrilegious asked 16/4, 2012 at 17:5

6

The Microsoft site suggests the following code should work: Dim numbers = {{1, 2}, {3, 4}, {5, 6}} However I get a complile error when I try to use it in an excel VBA module. The following does w...
Cutoff asked 5/7, 2014 at 7:26

5

Solved

Is there any way to return the name of a function or procedure at runtime? I'm currently error handling something like this: Sub foo() Const proc_name as string = "foo" On Error GoTo ErrHandler ...
Gabbi asked 30/5, 2014 at 0:42

3

Solved

It is possible to get the calling workbook name Application.Caller.Worksheet.Parent.Name and cell address using Application.Caller.Address, for a function called in Excel. Is there a way to get th...
Mudfish asked 4/6, 2013 at 11:55

© 2022 - 2024 — McMap. All rights reserved.