Curious
The HTML below contains a table with 2 rows. Each row has
the same id. (id="r1")
The following Subroutine will display the number of
elements that have id's set to "r1" only if 2 or more
exist... but will error out if only one exists.
Changing the value of one of the id's to something
different will cause the Sub to error-out. Why will it not
return a collection-length of "1"? Is this a bug?
----------------------------------------------------------
<html>
<head>
<title></title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Expires" CONTENT="0">
<script language = "VBscript">
Sub Test
set a = document.all.item("r1")
msgbox a.length
End Sub
</script>
<body>
<input type="button" value="Display Total" onClick="Test">
<br>
<br>
<table width="100%" border="1" cellspacing="0"
cellpadding="4">
<tr>
<td id="r1">Row 1 </td>
</tr>
<tr>
<td id="r1">Row 2 </td>
</tr>
</table>
</body>
</html> Tag: Script number of users in each mailbox store Tag: 144361
Good VBScript Debugger
Hi
I just started using VBScript and I am in need of a good
debugger. I have used the ones that come with Excel VBA.
Can anyone recommend one?
Thanks
Jack Tag: Script number of users in each mailbox store Tag: 144360
How to replace PivotTable data fields...?
Hi,
I'm progamming a pivot table using VBA. I have no problem manipulating
column or row fields, but how can I replace a data field? Everything I try
just adds the data field to the existing data field resulting in a mess.
The PivotTable.addfields methods *replaces* whatever columns were previously
designated as RowFields, ColumnFields, and PageFields with the new
specifications, as in:
.AddFields RowFields:="Date", PageFields:="Location"
But no matter what I try, I can't replace the data field.... I've even tried
setting the Orientation property to xlHidden, as follows:
' Hide existing data fields
For each pf In .DataFields
Debug.Print "deleting pf", pf.Name
pf.Orientation = xlHidden
'pf.Delete ' I tried deleting too
Next
They key is that I need to do this via code. I can easily do it by using the
Excel GUI. I recorded the resulting code - Excel was hidding the field by
setting its Orientation property to xlHidden. Why doesn't that work for me?
Many thanks in advance,
Robert Stober Tag: Script number of users in each mailbox store Tag: 144351
Need script to search file and copy the result to mapped server folder
Greeting,
I am looking for a script that can search all the office documents (or files
with specified extentions) on hard drive in windows 2000 and copy those
files to a folder on desktop.
It would be SUPPER if the script can also export IE favorites to the folder.
Thanks in advance. Tag: Script number of users in each mailbox store Tag: 144336
Response.Redirect question
Hello,
I am trying to write a line of text out to the browser window, wait for
period of time, then redirect to another .asp page. I am fairly new to
vbscript and figured that this would work but it doesn't.
'display to the user that the status files have been deleted
Response.Write "Kiosk report log has been deleted!"
'create a simple counter to hold the browser page. I'm sure there's a better
way then this but I'm still learning.
number = 1
Do While number < 100000
number = number + 1
Loop
'Redirect back to the index.asp page to show the status of the kiosks
Response.Redirect "index.asp"
Is there a way a to handle what I am looking to have done?
many thanks,
devin M. arnold Tag: Script number of users in each mailbox store Tag: 144335