if i do this in a worksheet:
=RAND()
i also specified that i want only 2 decimal places
and for example let's say that rand() = 0.07
what is the probability that when i call this function again i will get 0.07 ??
i know that ideally if we assume 100% randomness, the answer would be 1/ (10 * 10) because there are only 100 possible c...
I have a listbox select and I want when the user selects null for the empty string it produces to pull the nulls from the SQL table.
Here's what I have now. Blank strings return nothing because there are no empty fields in the table.
SELECT * FROM dbo.Table WHERE ID = " & TextBox2.Text & " and And Field1 IN (" & Msg1 & ")
How do I co...
i have a macro that goes through a directory and looks at all the files
unfortunately it's on a mapped network drive and its really slow
how do i stop the macro?
...
Hi I'm using VBA in Excel and need to pass in the values from two ranges into a custom function from within a cell's formula. The function looks like this:
Public Function multByElement(range1 As String, range2 As String) As Variant
Dim arr1() As Variant, arr2() As Variant
arr1 = Range(range1).value
arr2 = Range(range2).va...
i have an array like this:
Dim aFirstArray() As Variant
how do i clear the entire array>?
what about a collection?
...
Sub something(tecan)
On Error Resume Next
Dim arr As New Collection, a
Dim aFirstArray() As Variant
Dim i As Long
aFirstArray() = Array(Dir(tecan & "*.ESY", vbNormal))
aFirstArray(0) = Mid(aFirstArray(0), 1, 4)
Do While Dir <> ""
ReDim Preserve aFirstArray(UBound(aFirstArray) + 1)
aFirstArray(UBound(aFirstArray)) = Mid(Dir, 1...
Hi,
After updating Microsoft Office 2007 to Office 2010 some custom VBA scripts embedded in our software failed to compile with the following error message:
Object library invalid or contains
references to object definitions that
could not be found.
As far as I know, this error is a result of a security update from Microsoft (...
I have a website with 2 forms. One for search and another for the login. When I use the enter key to submit, the search is always called because it is the first form on the page.
What I want to do is program the enter key to click a certain button when a certain textbox has focus.
I'm using asp:textbox and asp:button for my login form....
I am developing a VBA project in Word and have encountered a problem with handling events when using a class that implements another.
I define an empty class, IMyInterface:
Public Sub Xyz()
End Sub
Public Event SomeEvent()
And a class, MyClass that implements the above:
Implements IMyInterface
Public Event SomeEvent()
Public Sub ...
I'm trying to automate word to replace text in a word document using Python. (I'm on word 2003 if that matters and Python 2.4)
The first part of my replace method below works on everything except text in text boxes. The text just doesn't get selected. I notice when I go into Word manually and hit ctrl-A all of the text gets selected ...
does anyone know if this is possible?
i was able to succesfully run hyperterminal and use it to send texts through my phone which is attached by USB.
anyone know how to do it in VBA?
...
Dim arr As New Collection, a
Dim aFirstArray() As Variant
...some code
For Each a In aFirstArray
arr.Add a, a
Next
i get this error: This key is already associated with an element of this collection
on this line : arr.Add a, a
what am i doing wrong?
...
I'm trying to change the value of my checkbox to true based on a another cell's value
if range("A1").value = "green" then
Checkbox1.value= true
end if
How to I change the value property to true for multiple checkbox at the same time
For some reason the code that i've tried doesn't do anything at all.
P.S. I'm using format checkbox...
sub main()
'''some more code'''
For j = InStr(1, stext, " ") To Len(stext)
If IsNumeric(Mid(stext, j, 1)) Or IsAlpha(Mid(stext, j, 1)) Then
letter1 = Mid(stext, j, Len(stext))
Exit For
End If
Next j
'''some more code'''
end sub
i am walking through line by line.
as soon as the macro g...
I have an Excel spreadsheet, and I want to put a button on it, so users will be able to upload their data to an http/ftp server, or send the data to the server using a socket directly. I have noticed that some people creates an ftp script to do. First of all, I'm not sure that everybody has ftp on their Windows machine, and secondly, I w...
I wrote code to send an SMS using my GSM phone which is attached to the computer through COM port. The code is below.
The problem is I do see that it is in the outbox of the phone and it actually appears to have been sent, but when I contact the recipient they say that I have not received the message.
I test the phone, and I create and...
does anyone know where i can get the official list of all AT COMMANDS available? i would like to get my computer speaking to my cell phone. i need all AT COMMANDS and i will hook it up to either .NET or VBA or anything else.
btw i have a motorola phone
...
Hi,
How can i perform to enter username and password when want to pull data into Microsoft Excel with web queries??? Have any solution can be used to solve this kind of problem?
...
I want to stop others from editing the cell contents in my excel sheet using VBA. Is it possible to do this?
...
I need to create a Microsoft Access database, but have a need, in one of my tables, for a single field to be strongly encrypted.
Since AES requires both a key and an initialization vector, I've decided to solve this problem by requiring a password to access the database (as the key), and a field in the table to hold a SHA1 hash of the ...