Is .Activate a better choice?
I'm asking because the line wsAdvancedFilter.Range("A1").Activate produces that "Run-time error '1004': Activate method of Range class failed" error when I have wbNewReport.Windows(1).Visible = False in operation...
Here's the full sub (and yes, I know I've not...
Nice!
Thanks, both. I appreciate all your help (as I strive to learn how to VBA properly).
JJ
Variables won't. Constants aren't
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)
Totally agree! It does feel like a very bad habit (born from starting with recorded macros).
Top quality staring! :-D
...because you're right,, that's exactly what it does. I didn't bother pasting the array code, but for completeness, here it is:
Public arrColumns(1 To 10) As String...
Excellent idea (and I'd like to be similarly more explicit all the way through my code), but in this instance it just gives
Run-time Error '438':
Object doesn't support this property or Method
The variable is defined as
Public wbNewReport As Workbook
JJ
Variables won't. Constants aren't
There...
Hi
I have some VBA code code in a workbook for summarising a CSV file report. Let's call this workbook "Reporter"
One of the first things it does is create a new workbook in to which all the data is imported, filtered, tidied/formatted and so on.
All works well but even with...
...lines).
They're printed a day or two ahead of each comp. We supply them by email to the pro shop who kindly print it and put it up on the board.
***
MORE LATER...BUT THIS AFTERNOON GOT MAD BUSY SO WILL CONTINUE TO RESPOND ANOTHER TIME
JJ
Variables won't. Constants aren't
There is no...
Hello Tek-Tippers!
LTNS!
My golf club (like most, if not all, other golf clubs) runs monthly competitions called 'Monthly Medals'. This competition is open for entry over three days, usually the Friday, Saturday, and Sunday of the second full weekend of the month (so 7th-9th at the earliest...
Thank you, both
@strongm (Hey! How are ya?!)
@gbaughma & strongm
This script includes two required parameters. The first is the path to which the log file should be copied at the end of the script run. The second parameter is the number of seconds to wait before analysing what drives have been...
As you start reading this you might think "This is an AD issue! Why is he posting this here?!" Well, you might well be right, but this issue ONLY occurs with Windows 10 clients, though I grant you only then when the script is called from GPO. Anyhoo, please, read on.
We have a logon script...
It is bizarre.
Because I've had to make progress I've had to lowered my puritanical approach to PS script coding and have worked out how to achieve the same thing using icacls calls from Powershell, so this isn't a show stopper.
It really does seem to just be a problem here though, which is a...
I've not incorporated any of your suggestions in to my script, I've only tested them from a Powershell console. So most recently as per your suggestions of 14 Feb 17 15:22.
JJ
Variables won't. Constants aren't
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo...
...had a quick go at this in Powershell (because, VB is so last century! [wink]), and came up with...
$sasVersion="8"
if ( Get-ChildItem ".\" "run sas*.txt" | Where-Object {$_.Name -like "*9*"} )
{
$sasVersion="9"
}
write-host "Run SAS $sasVersion"
But I'm not evangelising...
Alas no...its still replaces.
JJ
Variables won't. Constants aren't
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)
Thank you.
Well, no errors this time, but still not the desired effect.
BEFORE:
PS C:\> $homeDriveACL|fl
Path : Microsoft.PowerShell.Core\FileSystem::\\SERVER\linter_u
Owner : BUILTIN\Administrators
Group : DOMAIN\Domain Users
Access : DOMAIN\SPsearch Allow ReadAndExecute, Synchronize...
No. :-(
Set-ACL : Cannot bind parameter 'AclObject'. Cannot convert the "System.Security.AccessControl.FileSystemAccessRule" value of type "System.Security.AccessControl.FileSystemAccess
Rule" to type "System.Security.AccessControl.ObjectSecurity".
At line:1 char:40
+ Set-ACL -path:$objACL...
Most kind, thank you. I'll let you know on Monday.
JJ
Variables won't. Constants aren't
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)
Or, create an alias 'ServerA' that points to 'ServerB'.
I'm not sure how that would work with SQL (this article suggests it should work quite well), but using aliases is the way forward.
A file server might be called PLDNWINFS01 (Physical - London - Windows - File Server - 01) but you'll have...
We take the approach of never deleting anything. When a user leaves we disable their AD account and move it to a 'Left Company' OU.
This allows us to re-nable in the unlikely event they rejoin, and avoids any mysterious SIDs being left lying around on objects. Of course the latter point should...
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.