Macros and VBA
6432 TopicsNeed to keep the first sheet tab visible
Hello Excellers, We have a workbook with 55 worksheets each does several things. Now obviously there is no screen in the world big enough to display all 55 worksheet tabs. Or at least I am not aware of such a large screen. So... Best next thing is that we can display 16 worksheet tabs in a row on our current screen size. What I need is some VBA code to that would keep the first (the first sheet tab from the left) sheet tab visible at least any time these 16 sheets are activated, the sheet tabs are scrolled so that sheet(1) is displayed. After the 16th sheet tab... oh well can't do a thing about that... I have shortened the worksheet names so much that now they are so cryptic one needs a list to know the actual name. I have tried some Worksheet_change event code to select the first sheet then select the target sheet but that did not work at all. Any help will be appreciated. GiGi39Views0likes2CommentsGetting updated data from a Microsoft Form's SharePoint Excel Repository using VBA.
I want to grab data from an Excel file in SharePoint that is synced to a Microsoft Form and put it into a different file using a VBA macro, but I don't get the updated data. I have to manually access the Excel file that is a repository of the Microsoft Form Responses and let it sync to update. Then I can run the VBA. But I want to cut that manual step out. How can I do this?? I've tried many things (Power Automate, VBA updates, etc.), but no luck so far. I saw that I may have to use forms inserted through Excel online to get a file that refreshes immediately after each Microsoft Form submission, but that would mean I have to rewrite the Form and the VBA I currently have.132Views0likes9CommentsShifting Row information to a new worksheet
I have a workbook where I am trying to create taskings for individual staff. I am wanting to setup the following, but I am limited on not being able to use macros, as Excel is controlled by HO What I want to achieve is the following: Select an item for a drop down list (already created with staff names), and then once a name is selected, the whole row duplicates to a different sheet (which is the staff member's name) and fills the next available free row Sheet 1: The drop down list contains people's names and is in Column C Sheet 2-15: The sheets available are the corresponding names as in the dropdown list. For example: Drop Down List name = Tom Brady Sheet Name = Tom Brady So if Tom Brady is selected in Sheet 1, Column C, then the row that name is in, is duplicated to the sheet that has been renamed to Tom Brady, and fills the next available row after row 8 Any help on this is greatly appreciated.39Views0likes2CommentsVBA Code for Random Selection
Dear Experts, This is overly simple but I am an old self taught user! I have a list of names that I use to generate a random selection with the RAND function. The selected person display changes with every recalculation which works for my purpose. To add some drama for the audience (and who doesn't need more drama in their life!) I would like to simply recalculate the sheet 100 times (maybe more or less depending on the timing using Recalculate) and display a countdown counter in a cell, 100-1 for every recalculation to produce a spinner effect to the selection process. This way the audience can see their names flash with each recalculation but also see how close it is to the end of the "spin". In the old days, we used to call it a DO loop. A simple problem from my old BASIC, FORTRAN or COBOL days, but I just haven't mastered the syntax of VBA! I am using EXCEL Home and Student Microsoft® Excel® 2021 MSO (Version 2505 Build 16.0.18827.20102) 64-bit Many Thanks!Solved43Views0likes1CommentAdding an end time to existing row using VBA
I have the VBA set up to enter the date and time for when they start an order, but I need help for when they finish an order. When they finish the order and click the "Finish" button, I need the VBA to look for the original transfer number in the Data tab then return the end date and time (yellow). I realized that with the VAB I have now, it is starting a new line and entering the end time. Attaching the file. Thank you in advance.88Views0likes2CommentsError VBE6EXT.OLB
HolaWindows 10 home compilación 19045.5854, excel hoy presentó el error que no podía cargar "VBE6EXT.OLB" y si pincho en aceptar indica memoria insuficiente, también con un botón de aceptar. Intenté reparar la instalación (fuera de línea como a través de internet). Desinstalé y volví a instalar Microsoft 365. El problema persiste. Mi sistema tiene 32 GB, y funciona bien bajo carga, por lo que no es problema de memoria. Otras soluciones de internet que intenté fue limpiar la caché de excel y volver a registrar el archivo VBE6EXT.OLB, pero el problema persiste. ¿hay alguna otra forma de resolver la situación? Gracias. Daniel Castañeda Abarca37Views0likes1CommentAutofit Columns to Data Not Headings
Hello, I have a large table with some long headers, but small data e.g. header = "Suggested Order Quantity", data = single figures. I would like to wrap the text in the headers, and then autofit all columns to the data so that I can see more on one page. Is this possible? I am trying to build this into a macro, so if anyone knows how to code this that would be amazing! If I wrap and then autofit, the columns go to the width of the full header length. I also tried setting all columns to a small width, then wrapping and autofitting, but it did the same. Or do I just have to set each column width individually? Any help greatly appreciated, thanks!2KViews0likes4CommentsNew VBA person - Code not working
Hi, Using contributions from various snippets of code, I put togerther the following to swap first name last name to last name, first name. Problem: Regardless of the Column that I identify, it only works for data in A1 (and even then, at times it fails). If anyone can help, please let me know. thanks, Karen. PS I may have attempted something too ambitious for my novice level but I wanted to give it a try (and it would be great for what I need to do at work). Strangley enough, at least for me, even when I identify a column other than Column A, it will run using data from Column A instead of the identified Column I use a local version of Excel 365 Excel spreadsheets are also held on local drive Windows - updated I need a macro that: swaps first name last name to last name, first name ignores Row 1 because that has header info I need it to loop until there is no more data in the identified column Here's what I stitched together and again, I may have tried something too ambitious for my current skill level so greatly appreciate any insights . . . thanks, Karen Sub Reorder_To_LastName_FirstName() Dim rng As range Dim i As Long Dim strName As String Dim strFirstName As String Dim strLastName As String Dim arrNames() As String ' Replace "A1" with the first cell in the column you want to use your name column ' Replaced "A1" with "C1:" Set rng = range("C1").CurrentRegion ' Identify the row with the first name entry ' For this purpose, first name is in row 2 For i = 2 To rng.Rows.count ' Verify that the row has data If rng.Cells(i, 1).Value <> "" Then ' Pull full name strName = rng.Cells(i, 1).Value ' Split the name based on location of space arrNames = Split(strName, " ") ' Allocate first position to be the last name in array and first name to be second element in the array strLastName = arrNames(0) strFirstName = "" ' Loop For X = 1 To UBound(arrNames) strFirstName = strFirstName & " " & arrNames(X) Next X ' Trim to remove unneeded spaces strFirstName = Trim(strFirstName) strLastName = Trim(strLastName) ' Set order of Last Name, First Name rng.Cells(i, 1).Offset(0, 2).Value = strLastName & ", " & strFirstName End If Next i End Sub56Views0likes4Comments