Search:
Type: Posts; User: Comintern
Search:
Search took 0.11 seconds.
-
That's kind of correct... The "TestTestTest" string is actually in a file. The code maps the file to memory and places an array structure onto it. This allows the file to treated like an array in...
-
Try using the first snippet. Add a reference to Excel, and replace the debug statement with a write to file. Or, you could wrap it in a function and have it return the vValue variable.
A search...
-
It's not meant to be compiled alone -- it's just a couple code snippets to demonstrate how to do it. What exactly are you trying to do?
-
Try:
iFile = FreeFile()
Open file.bin For Binary As #iFile 'replace with the destination file name.
Put #iFile, , sBinary
Close #iFile
file.bin would be replaced...
-
I have several different types of displays in ListViews, and need to update all of them in a loop. Right now, I check the TypeName of the forms in a loop through the Forms collection. Problem is,...
-
We do something similar to this, as our document storage system favors .tifs. Our solution was to just print them all automatically when they come in using the Microsoft Office Document Image...
-
My personal preference is to test for the error instead of using an Exit statement. That lets me put all my cleanup code under the error handler and not have to write it twice. Perfect example of...
-
I have a handful of MDI forms with the same set of public functions. Is there any way to have a form implement an interface and then test for that interface, ie. "Implements iCustom". I've played...
-
Freaky :confused:. This resolved itself when I changed the variable name from lIndex to lColumn. I double checked that lIndex is never used higher than procedure level scope (it wasn't). Looks...
-
1.) csColumns is created by splitting a string in the form's initialize event, so it would always have a 0 LBound. I use the same code in a different form as well, and that one works perfectly.
...
-
I can't figure this one out. I get a subscript out of range error in the compiled executable that I'm not getting in the IDE. The error handler that fires is in this routine:
Private Sub...
-
Yep, it's the MB. I just reran the memory tests and noticed that all 3 sticks fail at the same offset. Coincidence? I think not.
Thanks for the input.
-
Yes, I read the manual (I've also been building PCs for 15 years). :)
The keyboard is PS2 and works fine. The motherboard's splash screen comes up, and I can access a couple other functions...
-
OK, so I finally got all the parts together for my new build:
(relevant parts)
Gigabyte GA-P35C-DS3R
2 sticks 1GB Crucial Ballistix 12864AA1065 DDR2 1066mHz
Core 2 Quad 6600 2.4G
The...
-
Seems to work with a Dictionary object. What about using that instead?
Private Sub Test()
Dim oDict As Scripting.Dictionary, sArray() As String, lCount As Long
sArray = Split("T...
-
That's a good question -- I'm assuming that it would since all you're doing is automating the normal opening of the DB file. I've never automated a DB with startup events, but assuming that they...
-
I personally like RuPaul.
http://www.imagehosting.com/out.php/i1526418_ruronpaul.jpg
Gotta love PhotoShop. :bigyello:
-
Set a reference to the Microsoft Scripting Runtime and use the file system objects to walk the directory tree.
Private Sub EnumFolders(sDrive As String)
Dim oFS As...
-
Give this a shot. Pass the database path to this function -- it returns an array with the code in each of the code modules:
Private Function GetAccessCode(sFile As String) As String()
...
-
What does your program do? The error codes (OLE automation error and "file not found") you're citing would indicate that the problem stems from running as a temp file. I'm guessing there are some...
-
Why does it matter if you need an API call? The code to open a .chm file is trivial:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal...
-
You might be able to do this with the FindFirstChangeNotification API.
-
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
...
Sleep 5000 'Pause for 5 seconds.
-
Cast the date and time from the string into a Date type and use the DateDiff function:
Private Sub TryThis()
Dim sInput As String, dDate As Date
sInput = "1/17/2008-8:53:25...
-
I thought this might be possible by hacking the array:
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
Private Type...
-
For i = 1 To datefilelength
Call List1.AddItem(events(i).appointments)
Next i
-
How about just using the intrinsic VBA functions?
Sub Reset()
If Len(Dir$("C:\temp\Intersect_result.shp")) <> 0 Then
Kill "C:\temp\Intersect_result.shp"
End If
End Sub
-
Willkommen ins VB Forums. Erstmals, Englisch ist die Sprache des Forums. Ich habe ein bissen deutsch, aber nur ein bissen. Versuchen Sie diesen Code:
If Left$(sData, 8) = "abc123 -" Then
...
-
Have you tried passing a string pointer instead of the actual string (probably a long shot)?
Private Declare Function SomeFunction Lib "XYZ.dll" ( _
ByRef FileName As Long, _
ByRef...
-
Many ways to skin this cat. I was mainly trying to minimize the string functions. If the calls to Sub1(Var1) etc. are inside the loop, it doesn't really matter what is in the array. You just...
-
Couple ways to do this. First, you can split any string into characters by passing it through a unicode conversion (sticks a null between each char) and then splitting on the null:
Private Sub...
-
The zip file is apparently missing a bunch of forms. I suspect though, that you are somehow going through the click event twice. Toss some Debug.Prints in and test the order of events. I'd also...
-
I'm not sure I understand what you want to do then. Are you adding the new record to the ComboBox?
-
:blush:
Forgot about that. Regardless, once the .dll call is made you need to manipulate the addresses passed manually into a variable. It works in .NET because you are getting a pointer...
-
This should be the correct declaration:
Private Declare Function SomeFunction Lib "XYZ.dll" ( _
ByVal FileName As String, _
ByRef PackedTemplatePtr As Long, _
ByRef PackedMaskPtr As...
-
ComboBoxes have a property that stores the index of the last item added. Just capture that somehow:
cboBook.ListIndex = cboBook.NewIndex
-
Just cache the current directory and ChDir back to it:
Dim sTemp As String
sTemp = CurDir
ChDir (App.Path & "\subsets\Core\")
DoubleVar = Shell("install_subse contractor.cmd",...
-
You need to add a reference to the Microsoft Scripting Runtime.
-
All you need to do is track the state of the button:
Private Sub Command1_Click()
Select Case Command1.Tag
Case vbNullString
Label1.Caption = "A"
...
-
Ahhh... Try the GetOpenFileName API. The common dialog control seems to just be a wrapper for the API. No idea why it declares that parameter as an integer though, the OPENFILENAME structure has...
|
Click Here to Expand Forum to Full Width
|