Hello guys,
I'm trying to setup a timeout for a macro I'm creating, it reaches out to a file, if that file is open it times out for 10 sec and then tries again.
My initial approach was to make a do loop for x seconds, but that was an awful idea because it prevents other actions from happening...
Hi Guys,
Thanks for reading my query.
I have written some procedures in VBA Excel on my win 10 laptop. But these procedures are intended to be used by some mac laptop users as well and they are facing error at this particular statement highlighted in red.
But this works fine in windows...
Hello All,
I am trying to have three cells filled on a particular sheet when a user opens the workbook every time. Here is the sub getting the values, which in in my module 1
Public Sub Project_Info()
Dim P_Number As Range, P_Name As Range, GC As Range
Set P_Number = Sheets("CO...
Hi All
Firstly a big pre-emptive thank you to anyone who can help
So a quick bit of background – this is for work, and we have hundreds of procedures.
Although ideally these would all be kept in some sort of cloud dashboard/database or wiki or something – that is not happening anytime soon...
Hi,
I have a Excel VBA project which use a database server as a backend. My problem is that I have to use the connection string, ADO and Recordset in every procedures.
So, I want to ask You if is any solutions to use the connections (string, ado, recordset) string once for all procedures.
Thanks
The main (possibly only) difference between a function and a procedure is a function can return values whereas procedures can't.
Therefore why use procedures at all? Why not just write functions and return values if you want, don't if you don't need to?
The below example will not work because of the If ASC = statement; Does not allow you to do this when starting a for loop. Any ideas as to how I could do this without duplicating code twice? In my production code, have many procedures inside the loop and would rather edit them once; if I have...
i have a procedure that groups two worksheets then copies them to a new workbook, then among other things renames one of the worksheets. One worksheet that is copied can not be renamed and it seems to be related to the code on the sheet module. The sheet module has code for the...
Dear Users,
I'm trying to run the code here:
Stack Overflow
When you press a button it checks the active worksheet and tries to run all the code in the worksheet object in Microsof Excel Objects that has the same name.
I tried running it but I get a Subscript Out of Range Error.
Thanks...
I am using a VBA macro to extract info from spreadsheet cells operate on them and return the values to a spreadsheet. Each odd numbered item is an angle. The following code works just fine. Is there a way to use a procedure or function to assure the number passed to the cell named...
Hi There. I have been saving my macros (procedures and functions) as excel add ins so that if I need them again, I just add that specific macro in (my job doesn't involve a ton of excel work so anything that I do with VBA I want to make sure I will have it for future reference). I can add in...
Hi,
I am trying to:
Loop through the list of names in 'Set RmRng = Worksheets("Data").Range("B9:B25")'
Copy and Paste each value into 'Set TgRng = Worksheets("Data").Range("C1")'
Run procedures
Repeat for next value in range 'Set RmRng = Worksheets("Data").Range("B9:B25") until last value...
Good evening, Mr Excel!
I'm in the process of writing a dynamic programming piece of code as part of a university case study. The assignment itself is very open-ended and doesn't mention VBA so there's no need to worry that I'm simply scounting for answers.
This would be the largest piece of...
Hi all,
Not sure if this is possible but what I'm trying to do is change the contents of a cell if that particular column is not relevant (based on Type).. I don't want to put a formula in the actual cell as I need it for possible data entry.. Is there a procedure or macro that would do this...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.