Category "vba"

VBA - worksheet object is hidden

I have a very simple yet seemingly unsolvable problem: I would like to copy a range of data from a worksheet to another. This is what I made up: Sub CopyProject

How can I use a for each loop on an array?

I have an array of Strings: Dim sArray(4) as String I am going through each String in the array: for each element in sarray do_something(element) next ele

Fetch data from website table using vba

I need to constantly update excel file with information, obtained from the following link (warning, ukrainian language): link to the Ministry of Finance web-sit

If IsEmpty then go to column A but in same row and extract that data

I am creating a spreadsheet which has many columns and I am trying to make it check if a cell in a certain column is empty then it will check to see the cells i

Delete a mailitem permanently in outlook

I'm trying to delete a mailitem using the outlook API. Like the following, Dim objMail For each objMail in objFolder.Items objMail.Delete Next Obviously, del

How to stop scroll bar auto jump in vba

I have a userform with a frame (Frame1) consisting a vertical scroll bar of height set to 1000 , the Frame houses 160 textboxes arranged in 40 rows and 4 column

How can I generate a "Social Golfer" matrix for worker seating arrangement?

EDIT: I am looking for an APL function, or MS Access VBA function, which takes as arguments the total number of employees, total number of dinning tables, and n

Using VBA to query a SQL Server table in Excel

I'm trying to query a table in Microsoft Excel using VBA. I've written up some code to try and accomplish this task, but I keep getting an error: run-time e

Create table from data on a worksheet with specific name and add column

I have a number of imported worksheets from CSV. The data includes timestamps based on UNIX epoch. Each time I import a new sheet I need to add a column to conv

Check if a cell from a selected range is visible

I have a VBA function in Excel returns a concatenated string of text from cells selected by users. This works as I require, however if there are hidden cells i

I keep assigning a value to my variable but it stays empty

I am currently working on a code that is supposed to assign a value to a certain variable and open a file with the name assigned to the variable. However, every

How to add icons to emails in Outllook?

While Folder.SetCustomIcon can be used to customize folder icons, the only thing related to icons for messages seems to be the deprecated (and basically undocum

VBA to copy a file from one directory to another

I have an access file that I regularly need to copy to another directory, replacing the last version. I would like to use an Excel macro to achieve this, and wo

Retrieving custom property value from received mail using GetProperty (which was set using SetProperty in Outlook VBA)

Reference: Outlook 2013 Windows 8 I have set a custom property on an outgoing mail using SetProperty. I am able to see this property and its value in the inter

How do I get the paragraph number of the currently selected paragraph in Microsoft Word into an AppleScript variable?

This is intended as an extension of the original question, The number of the current paragraph? How can I get it?, which does a nice job answering the question