macros and vba
6571 TopicsHow to move a cell value using an RTD formula (pulling in live updating data) when it changes?
Hi, I am using Interactive Brokers TWS trading platform and they supply a demo excel file that has RTD formulas to pull in a list of available live data trading prices such as Bid, Ask, Last, etc. The RTD connection does not allow you to pull in historical data for the trading prices mentioned above. What I am want to do is the following, if possible: The Last price traded for the MES Futures contract is pulled into cell F3 by using the following formula: I am currently connected to the TWS trading platform and the value in cell F3 is 4761.25 As soon as the markets reopen this value will change continuously. I want to be able to capture the price of 4671.25 that is pulled into cell F3 and move it down by one cell as it changes - for whatever number of cells I decide to capture. For example, if I decide to capture the Last 20 prices, then I want to populate the range F3 to F22. Once I can move the changing values into the cells below, I can then use conditional formatting to change the cell colors based on the criteria I use, which is my objective of the exercise. Thank You.899Views0likes2CommentsRunt-time Error 1401 When Importing a CSV file Using VBA
I am beyond frustrated that I cannot make this work. Let me explain. My spreadsheet needs to import a standard CSV file then parse that information into several different worksheets. The very first time I ran the import code it worked. The second time and every time after that it fails with the "Run-time error '1004': Application-defined or object-defined error" message. I tried this on a different computer with the same results first run it worked, every run after that it fails. Here is the code: Sub ImportCSV() Dim ws As Worksheet Dim csvFilePath As String Dim lastRow As Long ' Set the worksheet where you want to load the data Set ws = ActiveWorkbook.Sheets("Raw") ' Specify the path to your CSV file csvFilePath = "exportusers-all.csv" ' Clear existing data in the worksheet ws.Cells.Clear ' Import the CSV file With ws.QueryTables.Add(Connection:="TEXT;" & csvFilePath, Destination:=ws.Range("A1")) .TextFileParseType = xlDelimited .TextFileCommaDelimiter = True .Refresh End With End Sub This is the code I've found in numerous places when I search the internet when I search how to do it. I have tried this as a normal user and "Run as Administrator" both fail. My Trust Center > Macro Settings are as follows: Enable VBA macros - Selected Trust access to the VBA project object model - Checked The CSV file can be opened in a text editor and Excel without any issues, but if I try to import it, it fails completely. Any help or suggestions to resolve this problem would be greatly appreciated. Thanks.51Views0likes3CommentsExcel Help
Is there a way (either formula or macro /something) for the following. I have 2 different spread sheets (files) open at the same time. First is called Time Card Second is called Wages Time Card will have a staff members details as well as dates and shift times. (20 Tabs for different staff members and their details) Wages will have Tab 1 - Summary of all staff names, hourly rates, hours worked for each day and gross amounts to be paid Tab 2 - 20 payslips with the above mentioned details, but payslip style. Lets call the first person Joe Deer I need something in Time Card next or close, to this person's name, when clicking it it will jump to his payslip in Wages sheet As mentioned. Formula or macro.. Guess anything will do. Thanks130Views1like4CommentsExcel Macros Spreadsheets Not Loading
I've spent some time with Microsoft Support (almost 3 hours, including uninstalling my MS 365 and reinstalling it), but I'm having an issue with my Excel Macro spreadsheets not loading at all. This is what I get each time. Also having an issue with non-Macro spreadsheets that I'm unable to use the Bold, Italic, and Underline functions (get the spinning wheel and then Excel Not Responding), as well as not able to use the Format function (get the same spinning wheel and then Excel Not Responding). I've been using these same Excel Macro Spreadsheets for over 15 years. Please help!254Views1like2CommentsGetting data from Snowflake to Excel
Hello I have multiple no technical users and am trying to find a way to setup a snowflake query for them and then let them refresh it whenever they want or on a schedule, but I couldn't find a good solution this what i found so far: ODBC (Not great for non technical users needs setup on each user desktop) Power Automate (Needs Power Automate Premium which we don't have) Third Party tools (Expensive pricing models) Through Power BI (We want to separate this process from power bi) Any suggested solution please!Solved133Views0likes3CommentsPivot Table
Hi everyone, I have an issue with the pivot table. There are filters from slicers and row labels in the table; when I double-click on any category from the table to see the filtered data, Excel fetches all data, not just what I filter on. Like below, I filtered from the slicer, and from the row labels, (Bills) should be between 100,000 and 200,000. I would like to see the (Bills) for (Central) in the (Start), but it gives me 632,478 and bills less than 100,000 and 200,000, not the 3 clients. Even if I tried from (In Progress), it's the same; it brings all data. The issue is only with the Bills column, but other filters come up correctly142Views0likes1CommentMacros in Excel Programs
I am developing a macro enabled spreadsheet that creates a second macro enabled spreadsheet upon exit. Is there a way for the macro in my main spreadsheet to create UserForms and Modules in the second spreadsheet? My goal here is to distribute the second spreadsheet to users and their use of it will be controlled by the UserForms and macros within it.Solved166Views0likes2CommentsMacros blocked in shared OneDrive Excel workbook as untrusted source
I have a macro-enabled Excel workbook (.xlsm) stored in OneDrive and shared with another user. When they open the shared workbook in Excel Desktop, they receive the error: "Microsoft has blocked macros from running because the source of this file is untrusted." We've already tried enabling macros in Trust Center, adding Trusted Locations, and opening the file from a synced OneDrive folder rather than Excel Online, but the error persists. Since downloading the file creates a separate copy and defeats the purpose of a shared workbook, what is the correct way to allow VBA macros to run in a shared OneDrive-hosted workbook while keeping everyone working from the same file?194Views0likes1Comment