Thanks for the reply Combo,
I was just about to implement your suggestion when I realised that I hadn't thought it through. My macro is invoked manually, and therefore probably isn't responsible for setting the dirty flag as my spreadsheet asks me to save it whether or not the macro is invoked...
I have some spreadsheets which I mainly use for reference, but when I exit I'm prompted to save whether I do anything or not. Yes; there is some macro code in there which is undoubtedly doing this and which I don't really want to change.
What I would really like to do is reset the 'dirty' flag...
Hi folks,
I've scoured the net trying to find something that does this, but I can't find anything that seems to work. My basic problem is that I'm not a vbscript programmer and don't really know whether the values I'm passing to the functions are correct and what return values I should expect...
Hi to all you scripting gurus out there.
I have a problem with a small script which I have seen all over the net (including in these hallowed Tek-Tip pages) which should tell me if a service is running.
The script is called from a bat file with the line Cscript D:\perl-src\ProcessRunning.vbs...
Wow. Lots of good info there. Thanks a lot anotherhiggins and PHV both. I ditched the helper cells as suggested, and the format command works a treat too, so kudos to both.
Thanks for that PHV, however you have made the mistake of assuming that I'm not a numpty, because Criteria1:=">=" &Rules!A24gave me error 424. Anyway I looked at the help and changed it so it's now like this: Set startDate = Worksheets("Rules").Range("A24")
Set endDate =...
Hi everyone.
I have a monthly task which requires i apply a complex series of custom filters to a spreadsheet and extract the data. I thought it would be cool to automate the filters to ensure consistency. Most of the filters include date-filtering i.e. in the current month, before the current...
As an addendum, PHV, after some thought, I can perhaps understand that with multiplication and division it is possible to get a degree of rounding, but I am talking about the addition of 2 numbers each less than 100 and each with exactly 2 decimal places. To suggest that I should accept...
Sorry PHV, I guess I didn't. As far as I can see, no number is an approximation. Floating-point or otherwise, it is whatever number it is. You can't say that 1.23 is only an approximation of 1.23.
Cheers, changed to Currency and all now hunky-dory. However I can't quite get my head around a numeric datatype that struggles with basic addition. Unless I'm doing Single a disservice, and it's the Csng function that's the culprit. Even so, pretty unbelievable that this fundamental (or so it...
Hi folks.
I am looping through a text file, accumulating a certain value on each record into a variable defined as Single. The values are quite low, but to 2 decimal places.
Can anyone explain why when I say sngAmount = sngAmount + csng(strAmount) it manages to add 61.85 to 18.30 and come up...
Thank you PHV. Absolutely pin-pointed the solution and extremely quickly (unlike this response - doh).
And thanks Remou too; I shall investigate regular expressions too.
Both
To be honest, I can't believe I've not been able to find the answer to this question either in Tek-Tips or on the net, but I can't, so I am looking for the Tek-Tips experts to put me straight!
I simply want to find out if a string contains any of some specified characters. I have tried If...
Just going back to EBGreen's point for a minute, isn't there an implied order in a UDT? And if not, then is there another easy way to achieve the same effect i.e. mapping a group level field and then being able to reference the lower level fields?
Cheers Remou. It must have been something to do with me using Open As Input with Line Input versus your Open as Random with Get that made the difference, because mine didn't work and yours did!
However, although the first line in my my input file (created in a text editor) read in okay, the 2nd...
Hi. If I have read in a 40 char fixed length record into a string, can I move this value in one go into a field defined as a 40 char UDT, where the UDT is made up 3 fields; 30, 6 and 4 chars respectively? It seems madness that you have to do every element individually. I have tried the following...
Hi . I'm trying to use vba to open a .csv file out of excel, and use split to load up the various elements into an array. The elements can be text, numbers and dates. I've read on the net that i can declare my array as an object, and then convert when i want to do something with them. My problem...
Thanks to both of you guys for simple, working solutions that were rapidly provided!
I think I prefer the offset method, because that still allows you to copy/paste your formula into the full column without intervention. Because the indirect method doesn't change the text values of the formula...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.