Skip to main content

Questions tagged [vba]

Visual Basic for Applications; a subset of Visual Basic used in all Microsoft Office applications. Consider using this tag together with the tag for the specific application in question. Good questions on VBA generally contain some code and asks for solution of specific issues. Questions asking for entire solutions (please give me the code / how to do this and this with VBA) are off topic and will be closed as too broad.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
262 views

VBA Code to hide rows on multiple sheets

Very new to this so. Is there any way to have the option cell K473 be on tab 1 and change the hidden rows on tabs 2 to 11? The below works perfectly on a single sheet, but would like to have the ...
John 's user avatar
5 votes
1 answer
579 views

Making it so users that do not have macros enabled cannot see other sheets

I am working on a project that wants all users to have macros enabled. It is a shared sheet so I cannot simply hide everything as a baseline and unhide the sheets when Open_Workbook is ran. My goal is ...
Thomas Wohllaib's user avatar
0 votes
0 answers
29 views

Excel VBA Macro

i need help for problem below:- when have an empty row, i want next data to fill in on those empty row i want data row 16 move to empty row 13 enter image description here For C1 = 1 To 273 Step 46 ...
Engr Muhd Afizul's user avatar
0 votes
0 answers
54 views

Unable to edit the required text and update auto-date

I Should be able to edit any text updated except , "Posted", "Closed" in J Column. Every time I edit the text the date should be auto updated in next column cell. For example, I ...
raju nagavelli's user avatar
0 votes
0 answers
100 views

Any way to disable the Accessibility Checker on a Workbook

I am working on a project that for security reasons needs to have the accessibility checker disabled. Although through settings I can disable it on my excel, I need to find a way either through VBA or ...
Thomas Wohllaib's user avatar
0 votes
2 answers
525 views

Making a workbook only able to be opened in the excel desktop app

I am working on a project that requires all of the users on it to be on the desktop app for sheet security reasons. The sheet security can be bypassed by simply not having VBA run by opening the sheet ...
Thomas Wohllaib's user avatar
0 votes
0 answers
174 views

How can I recover vbaproject.bin from my corrupt powerpoint.pptm file

I have a .pptm file with 70 hours of code work in it. It has become corrupted and I have no backup (very stupid I know!). What I do have is the .ppam which was generated from a slightly earlier ...
kwibbler's user avatar
0 votes
0 answers
155 views

Outlook 365 VBA to access entries in a group mailbox contact list

I don't know if this is possible but I want to insert into the To of an email, an entry from the contacts part of a group mailbox address book. I have managed to find the code to show the contact list ...
Fritzybabe's user avatar
0 votes
2 answers
186 views

Excel macro to split the date and time in one column to two separate columns

The code created by the macro works just fine, but looks clumsy. Can anyone assist in cleaning this up so that I can learn to make the recorded macros cleaner going forward? Sub SplitDateTime() ' ' ...
Iron Man's user avatar
  • 103
0 votes
1 answer
493 views

Creating a VSTACK'd array from a changing list of spilled references

I am working on a project that requires a large 'pool' of data to pull from and sort from. To keep the workbook efficient, the data is kept in sets of SPILL's, as pulling a raw selected range for the ...
Thomas Wohllaib's user avatar
-1 votes
1 answer
88 views

VBA "Block If without End If" Error on Worksheet Change

I have a spreadsheet that uses data validation to create dependent dropdowns for several of the cells that have specific values in a database. Even with the dependent dropdowns a user can still enter ...
droberts26's user avatar
0 votes
1 answer
91 views

Hidden Personal Macro Workbook Opens upon running macro to close ActiveWorkbook

I have a macro that I have coded to close the activeworkbook after running a series of formatting and saving it as a PDF. However, it opens a hidden version of the personal macro workbook immediately ...
churchizactiive's user avatar
0 votes
1 answer
61 views

PowerPoint VBA - Slide Show - Win11 not updating Slide Content

I have a PPT slide deck (2 slides) saved as a PPTM file that are used as a countdown timer where the time remaining is controlled by VBA on slide 2. It used to work properly when I was on Windows 10 ...
psycoperl's user avatar
0 votes
1 answer
33 views

Using Javascript in TextExpander to validate text on the clipboard and make it Bold

I'm not sure if this is possible but essentially I haven't been convinced to switch to the new Microsoft Outlook because I value the functionality of VBA. Specifically, I use VBA to always validate ...
churchizactiive's user avatar
-1 votes
2 answers
140 views

Pop out emails in folder pane only when in reading reply/foward pane? [closed]

I have a code that I want to (upon manually running the code) pop out the email in the folder pane to a pop out window. I only want it to do this whenever I am currently drafting a reply/forward. ...
churchizactiive's user avatar
2 votes
1 answer
50 views

Separately color all rows for unique clients listed in one column

I am a relative Excel noob, and to that end, forget about Excel macros. I'm here because this seems to be where the GOATs congregate, and I really need some help. I have an enormous data set that ...
alm's user avatar
  • 23
0 votes
2 answers
671 views

How to handle protected view errors in Excel VBA macro

Introduction. I have a local website, and one of its pages is used for downloading an Excel report by several users on their PCs. The file is automatically generated with some data from our database ...
Garry Gorn's user avatar
0 votes
2 answers
354 views

How to add a keyboard shortcut for a macro in excel

I want to add a custom keyboard shortcut for a Macro (to zoom in and out) in MS Excel. It works very well with Word thanks to this answer, but on Excel (at least with Version 2310 that I'm running) ...
ludicrous's user avatar
1 vote
2 answers
304 views

How to insert username in system username format in Word using field code

I want to insert current username via field code. There is a field code UserName. This field code's return value is like Application.UserName in VBA i.e., "Super User". I want the return ...
Dhay's user avatar
  • 133
-3 votes
1 answer
96 views

Quick VBA syntax

I need to solve this task by adding a VBA syntax for the following: In Column A I have random numbers between 1 and 7. On Column B I need to insert "a day" for rows equal to 1 and "...
Andon Key's user avatar
0 votes
1 answer
103 views

excel text spilling into adjacent cells on BOTH sides under certain alignment conditions when text is too long

I have this issue that only crops up after running a vba to concatenate cells while retaining the original formats (using right to left characters). When the sheet is set left-to-right, or if ...
Eppes A Yungeman's user avatar
1 vote
0 answers
58 views

Excel on macOS: confirm warnings once and for all

I'm using Excel 16.78 (23100802) on macOS 12.7.1 (Monterey) I want to get rid of the following warnings: How can I confirm these messages once and for all, such that they don't appear every time I ...
jamacoe's user avatar
  • 184
0 votes
0 answers
162 views

PLink telnet from Excel VBA - avoid login delay, or maintain session for multiple queries

I have a Linux box which I'm testing, and I have an Excel workbook with tables of tests I'm running. (Don't get tied up on Linux, it's just a Telnet target for the purposes of this question.) The ...
Scott's user avatar
  • 11
0 votes
1 answer
210 views

Remove duplicates across multiple sheets

Sub WorksheetLoop() Dim WS_Count As Integer Dim I As Integer ' Set WS_Count equal to the number of worksheets in the active ' workbook. WS_Count = ...
Michael Nares's user avatar
0 votes
0 answers
418 views

How to get live data from a website in Excel

I want to get the price of an item from AliExpress in Excel. For example, this item. I modified the URL to get the specific product variant using this. I found this to get the name and price of the ...
John Doe's user avatar
  • 107
0 votes
0 answers
87 views

How do I automatically generate colour styles in LibreOffice Calc using VBA?

I want to be able to run a macro to automatically create a set of named styles that change the cell background colour. I tried this, but it doesn't work: REM ***** BASIC ***** Sub ...
skeetastax's user avatar
0 votes
1 answer
212 views

Word VBA: How to check if the window "in focus" is a protected view or not

In my Word VBA AutoOpen Sub, I want to check if the opened document has been opened "normally" or if it has been opened in protected view. However, if I use ThisDocument.Application....
Loeli's user avatar
  • 896
-1 votes
1 answer
275 views

How can I use Excel to replace values in a comma separated list with values in another cell?

I have a lookup table that looks like this: ID | SKU 1 | 5123 2 | 1238 3 | 5812 And another table that has a comma separated list of SKU: SKULIST 5123, 1238 5812, 5123 How can I add a column that ...
Timothy Fisher's user avatar
0 votes
0 answers
74 views

Value change upon assigning data from array to range

I'm writing back my data from an array to range. The variables stored in array are of Variant/String type: 20.00 20.99 etc. But when they are put into range (formatted as General), the values are: 20,...
Rayearth's user avatar
  • 355
0 votes
0 answers
37 views

Looking for common solution to validate Excel reports (ETL)

I'm trying to more efficiently validate financial reports generated in Excel. Currently, a user generates around 300 reports in Excel using different Sheets in each. These reports use extensive ...
Iqbal's user avatar
  • 1
0 votes
0 answers
43 views

Trying to make a find and update function for Excel

I tried to use a VBA code in SharePoint and it did not work. I also tried using the workaround of power automate desktop but my work does not allow the desktop version because of I.T protections... My ...
Aaron's user avatar
  • 1
0 votes
1 answer
388 views

VBA Text to column with xlDMYFormat in only one specific column

The below code is working perfect for me, exept for one detail. All my data end up in the appropriate columns with the right format, except for column D where they end up in US date format in stead of ...
Caroline's user avatar
0 votes
0 answers
99 views

Excel VBA Input and Output automation from and to a range

I am trying to automate moving data from a range (A2:A869) into a cell (G2)and then copy the output (G5) into a corresponding range (B2:B869). In simple terms I want to automate copying a single value ...
Puch's user avatar
  • 1
0 votes
1 answer
107 views

Never update an excel UDF after creation

In excel, I am trying to generate a UUID column in a table using a vba UDF, but I only want it to run the first time it is called so that the UUID that it generates never changes. Making the UUID is ...
vorpal's user avatar
  • 113
0 votes
5 answers
155 views

How to do this very specific concatenation and transform an array to list using Excel?

First off, sorry for any grammatical errors, I'm not a native English speaker. My problem is as follows: I have a very big dataset which contains populational data of a given city (row) in a given ...
HighConceptTroglodyte's user avatar
0 votes
0 answers
332 views

How to wait for Web Query to complete in Excel VBA Macro

I have an Excel file that uses an API to lookup some data from a website. It is built using the standard "Get Data from Web" built in PowerQuery feature of Excel. I run a macro to update ...
techtheatre's user avatar
0 votes
0 answers
36 views

Deleting an image from two separate worksheets

I have an image on two worksheets within the same workbook. One sheet is called "_SETUP" and the other sheet is "Layout1". It all seems to be working as long as there really is ...
techtheatre's user avatar
0 votes
0 answers
34 views

Copying a specific range of cells form multiple worksheets in a work book to a Summary Sheet

I have data on 28-31 different worksheets based on the month. the data is goes from B23 to J33. I need to copy and paste those cells from each tab to a Summary tab.
Kevin Trippel's user avatar
0 votes
0 answers
126 views

Excel macro requests access to an external file: removing dependencies

I download an Excel file and I copied the sheets (I tried also to maintain only the main sheet; figure below) and the macro in a new Excel file; when I try to execute the macro, this message appears: ...
Gennaro Arguzzi's user avatar
0 votes
1 answer
970 views

Word macro: Insert text into each selected cell of a table

I am trying to format cells and insert text (in this case a checkbox) in each SELECTED cell in a table. This is used as a place keeping aid in my plant emergency procedures. The cells format properly, ...
Rokbottoms's user avatar
0 votes
1 answer
114 views

Excel: How to reorganize longitudinal data by merging cells based on year

Now I have some longitudinal data in the following format: id year_1b year_2 Variable_1b Variable_2 ... 10001 2018 2020 1.1 1.2 ... 10002 2018 2020 0.3 0.5 ... 10002 2018 2020 1.8 2.6 ... ⋮ ⋮ ⋮ ⋮ ...
Greenhill's user avatar
  • 101
0 votes
0 answers
73 views

Copy range of row using two dropdown list as start time and end time in Excel

I have list of data that fetched from SQL at defined time range: At that image I also already make dropdown list named Start time and End time. The question is: how can I make a macro that the output ...
Romy Prazhad's user avatar
0 votes
1 answer
124 views

How to bulk edit Word document so all the Chinese characters are placed in the same vertical position?

This is the Word document I received. I need to find a way to put all the words into three lines (ideally), where all the Chinese and phonetic symbol lined up vertically. How can I do that?
jxhyc's user avatar
  • 563
-1 votes
2 answers
180 views

VBA - Schedule tasks on oddly particular days

So I'm learning VBA with a lot of excel projects at work. I'm trying to see if I can get a macro I wrote to execute at certain times, autonomously. I've read articles on how to write a script to open ...
Patzy's user avatar
  • 1
0 votes
1 answer
91 views

LibreOffice Impress macro is only half functional when used in presentation as opposed to outside

I made an .odp file that contains two slides. In Slide 1, there is a single circle that when clicked on moves to Slide 2. This circle uses a simple interaction and no macro. In Slide 2, there is a ...
wc80399's user avatar
0 votes
1 answer
156 views

Is it possible to restrict a VBA macro command to just one workbook?

I have macros added as commands to a specific workbook. But a new workbook will show the commands, and if I click it, it just opens the previous workbook. I would rather them not be there in new ...
J.P.'s user avatar
  • 5
0 votes
0 answers
101 views

move a group of sheets that contain a table and slicer using vba

I want to move a group of sheets that contain a table and slicer. I tried using vba. It moves all sheets but slicer disappears. I have multiple slicers in multiple tabs. Help me with vba code
San's user avatar
  • 1
0 votes
1 answer
6k views

You cannot move or copy a sheet that contains a table

I am trying to copy a sheet to another workbook. It has a slicer that is connected to the table.I want to move both Table and slicer. I get an error saying "You cannot move or copy a sheet that ...
San's user avatar
  • 1
0 votes
1 answer
151 views

Power Query: Re-bind a Query to a Worksheet / Table that has been Deleted and Re-Created

I am using Power Query in Excel for Microsoft 365. I am using VBA, rather than the graphical interface, to perform Power Query operations. Assume I have an existing workbook, with that workbook ...
Dave's user avatar
  • 1,029
0 votes
0 answers
44 views

Altering Z Order of SAP GUI Windows with Script While Under Lock Screen in Windows 10

I'm having trouble trying to automate SAP GUI windows for parallel extraction of data via VBA in Access when that activity is under a lock screen. Specifically there are times when a context menu ...
Ian J.'s user avatar
  • 1

1
2
3 4 5
76