[Newbie Question] Excel and VBS
Hi Everybody! I'm trying to create a simple interface with some listbox in
excel, using a form and a multipage control.
It works great, but there's still a little problem. When I run the interface
( It opens when i open the excel file ), Excel seems to be frozen : It
accepts the value I set in my interface without problem, but I can't move
trought the page and I can't even save.
I've noticed that if I set the automatic save function to ask if I want to
save, after I accept to save Excel starts to work again and I can move
through the pages and so on.
There's a less rough way to make Excel work than the "autosave way" ?
Thanks !! Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144327
FYI - Microsoft patch available for QHost-1 exploit
Microsoft has released a patch for the vulnerability exploited by QHost-1.
See: http://www.microsoft.com/technet/security/bulletin/MS03-040.asp
--
Michael Harris
Microsoft.MVP.Scripting Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144304
Script Editors-newbie question
I'm new to writing scripts so I wondered what editor everyone uses to write
WSH scripts. Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144299
export data to Excel
Hi experts,
I retrieve data from the database and display on ASP, then I export these
data to a file, like Excel (the best) or text file. Is it possible? I think
it is possible, but how can I do that? Thanks for any help.
Atse Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144288
Microsoft Internet Transfer Control
I'm attempting to FTP from an Access app in VBA. I want to use the MITC
6.0 (SP4) reference. Do I need to have VisualBasic installed on the
workstation to execute this? My code works fine on one workstation that
has VB, but doesn't on another without VB. I copied the .OCX file,
which helped me compile, but I get an "ActiveX component can't create
object" error.
So, it seems VB6 (SR4) is necessary. Please, someone tell me I'm wrong.
Thanks in advance. Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144286
Script in NETLOGON folder fails to run at logon, but runs from cmd line
Thanks for taking a look at this.
Here is the situation:
I'm on a small w2k network. I have sucessfully been able to run a
"hello world" msgbox script by putting the script into the NETLOGON
folder, while putting the script into a particular user's profile
login script in Active Directory . The simple script executes at
login, displaying the msg.
The problem comes when I try to execute a more complex script. It
seems to fail to run entirely. I have placed a msgbox line at the
beginning of the script, but no message is ever displayed.
I *can* run the script from the client machine at the run prompt by
typing the path to the script: \\server\NETLOGON\ScriptName.vbs
argument
This works fine.
Why is it refusing to run itself at login? Any suggestions would be
appreciated.
TIA...
Trey Carroll Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144284
Script to disable or uninstall the IPX protocol
I am in the process of planning a migration from Netware to W2003 AD and
would like to migrate all the users to AD and still have them attach to the
Netware environment. Then add the end, when everything is migrated I want
disable or remove the IPX protocol from the W2K and XP PCs. Your help is
greatly appreciated.
Thanks,
Dave. Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144267
How to know a file is opened for editing by someone...
Is there a property or something I can read which will
tell me if a file is opened for editing by someone else
before I try and access it???
I know how to get the read-only property and such, but I
need to know if it's currently open.
Thanks Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144266
Converting a range to string
Hi,
I've got a range object that I want to convert to a string so I can use in
the PivotTableWizard method:
Dim rng As Range
set rng = Sheets("sales").Range("A1").CurrentRegion
I want to convert rng into a string like this:
"sales!R1C1:R796C6"
Any help you can provide will be greatly appreciated.
Robert Stober Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144263
Export Registry Key
I need some help here.... what I am trying to do is to export a certain key
so that we can back that key up to a remote system. This is a web server
and we want to backup the entire Allair\cfusion\currentcontrolset\logs for
example to a folder which would then be picked up by another process and
stored for disaster recovery purposes. This file holds all the
configuration info for our sites. I grabbed this script:
Set objShell = CreateObject("WScript.Shell")
objShell.Exec "%comspec% /k reg.exe SAVE HKLM/System sw.hiv"
And had the actual path to the registry key and nothing happened when i ran
it. I then just ran the actual script that is illustratated in the Windows
Scripting Guide and again noting happened. meaning that if i did a search
on the system for sw.hiv I would hope to find that. Im obviously a novice
so any help you can provide would be appriciated.
Bob Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144261
Looping Through Form Inputs
Hello,
I am hoping this is the right newsgroup for I have a question that is
bothering me and wanting some input on.
I have a form that delivers checkboxes from a database table. Basically it
shows a list of options of training someone could select. Upon submission
the selected fields get written to another database table. A new form opens
from there that loops through this new table. Every selection that has been
previously selected has five options that are associated with it.
What I am trying to do is then loop through all of those form field entries
to update these five selections to the database.
Can anyone help me with this, if you need more information I can provide it.
Thanks In Advance Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144258
VBScript References
Hello Everyone:
Can anyone tell me where I can find, ideally on the net, any
ebooks or tutorials ranging from beginner to advanced VBScript? Thank-you.
Kevin Parkinson Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144257
Adding user to remote machine administrator group
Hi there,
I am looking for script using which i can add user to
administrator usergroup on remote machine.
Thanks
Vijay Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144256
Any way to obtain file owner without using ADsSecurity?
Hi, I'm trying to put together a small script to perform a routine
check on a system, and I'd like to obtain file ownership information
from within a Windows script.
I did a bit of searching and most everything I found refers to
something called ADsSecurity which I understand is not a part of the
standard Windows installation.
Is there any other way to obtain this information I might have missed?
Thanks in advance, regards
Damián Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144253
Capture Cancel button
Does anyone know how to capture the cancel button in VB for SP4
installation? Basically what I am trying to do is install SP4 using a Logon
Script but if a users click on the Cancel button I want to display a MsgBox
stating "You are not suppose to press cancel" , but if the user lets it run
and complete the install display the "SP4 has been installed"
Thanks
Sal Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144247
Dynamic Array as pivot table SourceData..?
Hi,
As far as I know, the SourceData for a Pivot Table can be an array of
ranges, but it's not working for me. The following code creates a dynamic
array of ranges, which is then supplied to the SourceData parameter of the
PivotTableWizard. This causes an error "Pivot Table Wizard method of
Worksheet class failed".
----------------------------------------------------------------------------
-----
im i As Integer
Dim m As Integer
Dim pivotTableRangeArray() As Range
Dim dataSheetNames() As String
Dim re As New RegExp
' Populate an array of data sheet names
re.IgnoreCase = True
re.Pattern = "[a-z]\.[a-z\_]"
m = 1
For i = 1 To ActiveWorkbook.Sheets.Count
If re.Test(Sheets(i).Name) Then
ReDim Preserve dataSheetNames(1 To m)
dataSheetNames(m) = Sheets(i).Name
'Debug.Print "Sheet:", i, m, dataSheetNames(m)
m = m + 1
End If
Next i
Set re = Nothing
' Populate an array of ranges for the pivot table
For i = 1 To UBound(dataSheetNames)
' populate the pivotTableRangeArray
ReDim Preserve pivotTableRangeArray(1 To i)
Set pivotTableRangeArray(i) =
Sheets(dataSheetNames(i)).Range("A1").CurrentRegion
'Debug.Print i, UBound(pivotTableRangeArray)
Next i
' Create the pivot table - use the
With ActiveSheet
.PivotTableWizard SourceType:=xlDataBase, _
SourceData:=pivotTableRangeArray, _
TableName:="sdc.vsim_c", _
TableDestination:=.Range("A65536").End(xlUp).Offset(2, 0)
End With
----------------------------------------------------------------------------
------
Can anyone shed any light on this?
Thank you very much,
Robert Stober Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144246
newbie problems with ASP querystrings
I'm trying to figure out how to do basic form/querystring handling in
asp and I thought I had it figured out but even though I follow all
the examples I can find, I can't seem to get it to work. Here's a
sample page that will not show the values on my system (on neither the
test server or the live server).
---------------- file: response.asp -----------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>Untitled Document</title></head>
<body>
<p>Form Input</p>
<form action="response.asp" method="post" name="response"
id="response">
<table border="2" cellspacing="4" cellpadding="2">
<tr>
<td align="right">FirstName</td>
<td><input name="FirstName" type="text" id="FirstName"
value="Noone"></td>
</tr>
<tr>
<td align="right">LastName</td>
<td><input name="LastName" type="text" id="FirstName22"
value="Special"></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" name="Submit"
value="Submit"></td>
</tr>
</table>
</form>
<% If Request.ServerVariables("REQUEST_METHOD") = "POST" Then %>
<p>Form Response</p>
<table border="1" cellspacing="4" cellpadding="2">
<tr>
<td align="right">FirstName</td>
<td><%=Request.QueryString("FirstName")%></td>
</tr>
<tr>
<td align="right">LastName</td>
<td><%=Request.QueryString("LastName")%></td>
</tr>
</table>
<% End If %>
</body>
</html>
--------------- end of file inclusion -----------------
I have had some scripts working with Request.QueryString but I will be
damned if I can see the differences between those and the one's I am
working on now. What am I missing here? If I submit that form, the
second table builds blank right columns...
Kathy Lynn Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144244
Getting Access is Denied Errors
After combining two different scripts (to make one that not only looks
to see if a directory is installed but install one of two different
packages depending) I'm getting so close. I get to line 12 when I get
an Access is Denied error (80070005). I'm trying to use the Domain
Administrators account to no only check but to install the software...
Any help would be appreciated. (BTW, the script is completely
finished so don't mind the crap at the bottom...
1) Const wbemImpersonationLevelDelegate = 4
2) Const wbemAuthenticationLevelDelegate = 1
3) strComputer = "jairo"
4) Set objwbemLocator = CreateObject("WbemScripting.SWbemLocator")
5) Set objWMIService = GetObject("winmgmts:" _
6) & "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
7) Set objConnection = objwbemLocator.ConnectServer _
8) ("jairo", "root\cimv2", "rogers\administrator", _
9) "wideawake")
10) objConnection.Security_.ImpersonationLevel =
wbemImpersonationLevelDelegate
11) objConnection.Security_.AuthenticationLevel =
wbemAuthenticationLevelDelegate
12) Set objSoftware = objConnection.Get("Win32_Product")
13) Set objFSO = CreateObject("Scripting.FileSystemObject")
14) Select Case objFSO.FolderExists("C:\Program Files\IBM\Client
Access")
15) Case objFSO.FolderExists("C:\Program Files\IBM\Client Access")
16) errReturn =
objSoftware.Install("\\file1\common\CAUpgrade.msi", , True)
17) Case Else
18) errReturn = objSoftware.Install("\\file1\common\CA.msi", ,
True)
19) End Select
20) Wscript.Echo errReturn Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144243
Variable Size (character) Limits???
I have an application that uses client side VB Script to create and fill a
variable with items in a HTML multi select list.
Everything works great, but as soon as len(variable) > 1,910 my application
fails. Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144242
new to vbscript : DEBUG
hi,
i write vbs file for an application. My vbs are call for a VB application.
I don't know how to debug my script?
I see some message that spoke about wscript.exe but when i run this program
nothing append
Is there a program for debugging vbscript like in visual basic
Regards
seb Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144241
Wildcards for Set Commands **please help**
Here is what I have, we have over 400 branches in our company each one name
Branch 004, Branch 005, Branch 006, and so on. I want to create one script
that will use a wild card for each Branch name and with that load the proper
Set Commands. Each Branch has its own Snap Server or Network Storage Device,
named Branch 004 Snap, Branch 005 Snap and so on. We used to have it set in
the Autoexec for each PC (SET SNAP=\\BR004snap) , but now that we are an
entirely Windows 2000 or XP, I want to use Active Directory.
Basically what I want to do is this, based on the Branch number set the
variable based on the branch number to the Branch Snap name, for example, if
branch name = branch 004 then 'set snap = branch 004', but I want this to be
done with a wildcard if possible using the Branch number (so I dont have to
key in 400 different scripts for each branch).
Any help would be greatly appreciate, thanks!! Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144239
Listing Processes By Username
I currently have a script that will list all running
processes and the usersnames of the user that the process
was started as.
When I run this script on a machine within a domain I can
list all processes and all usernames, but when the same
script is run on a Windows 2000 Server in a workgroup I
can only list processes running as SYSTEM or the currently
logged on user. I am logged on with the administrator
account but this has no effect. Any ideas as to what could
be causing this would be greatly appreciated.
Thanks
Rhys Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144234
UserAccountControl property values
Hello,
Can anyone please confirm what the UserAccountControl values 4130
and 4128 mean?
4096 is a default workstation account
32 is No password is required
2 is The user account is disabled
My guess is:
4096 + 32 = 4128 = No password is required for the workstation
account.
4096 + 32 +2 = 4130 = The workstation account which does not require a
password is disabled.
Is that the way it works?
Thanks for any replies.
Charles Tag: Try on that correction update that came from the Microsoft Corporation Tag: 144232