Try this instead.
If my_dialog.CheckBox1 Then
Sess0.Screen.Sendkeys("<Home>CCM 01 4837 999<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Tab><Tab><Tab><Tab>DS<Tab><Tab><Tab>02<Tab><Tab><Tab><Tab><Tab>TEST<Tab>02100<Enter>")...
If my_dialog.chk1 Then Msgbox "RUN CODE FOR .chk1"
is the same as
If my_dialog.chk1 Then
Msgbox "RUN CODE FOR .chk1"
End If
Why do you need an ElseIf? The code above says, "If chk1 is checked, Msgbox "RUN CODE FOR .chk1." If chk1 is not checked, do nothing. What are you trying to achieve?
Try removing the bind variable.
sub select_item
{
my ($dbh, $id) = @_;
my ($sth, @row, $row, $count);
my $sql = qq{ SELECT * FROM export};
$sth = $dbh->prepare ( $sql ) or die $dbh->errstr;
$sth->execute($id) or die $dbh->errstr."\n$!\n"...
How about using the right function?
Right(target_cell, Len(target_cell) - 1)
What do you get with the following?
Debug.Print Asc(Mid(target_cell, 1, 1))
I stole the following code from one of the pros here (CMP, I think). I'm not sure how it behaves in Outlook 2007.
Sub Unzip_It()
Dim extract_path As Variant, zip_file As Variant
extract_path = "C:\Documents and Settings\admin\Desktop\Temp"
zip_file = "C:\Documents and...
'----------------------------
' | Column A | Column B
'----------------------------
' Row 1 | Anna | 3
' Row 2 | George | 2
' Row 3 | Anna | 5
' Row 4 | George | 2
Sub Consolidate()
Dim dict As Object, curr_key As Variant
Dim curr_name As String, curr_amount As Long...
Option Explicit
Declare Function Check_Screen_Position(Sess As Object, row_no As Integer, col_no As Integer, search As String) As Integer
Sub Main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject ( "Extra.System" )
If Sys Is Nothing Then
MsgBox ( "Could not create...
Option Explicit
Declare Function Get_Line ( Sess As Object, search As String ) As String
Sub Main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject ( "Extra.System" )
If Sys Is Nothing Then
MsgBox ( "Could not create Extra.System...is E!PC installed on this machine?"...
Here's something for you to play with.
Option Explicit
Sub Main()
Dim obj_ol As Object, obj_ns As Object, obj_inbox As Object
Dim obj_filtered_items As Object, obj_mail_item As Object
Dim i As Integer
Set obj_ol = CreateObject("Outlook.Application")
Set obj_ns...
Instead of
open( LOG, "$file" ) or die "Cannot open file $!";
my $cnt = <LOG>;
close(LOG);
++$cnt;
open( LOG, "> $file" ) or die "Cannot open file $!";
print LOG $cnt;
close(LOG);
You can do this
# +< Read first, then write
# +> Write first, then read
# +>> Append first, then read...
Sub Test()
Const max_column As Long = 80
Call Print_Lines(Application.ActiveWorkbook.Path & "\Input.txt", max_column)
End Sub
Private Sub Print_Lines(file_name As String, max_column As Long)
Dim i As Long, curr_chars As String, curr_line As String, lines As String
Open...
Function Get_Desktop_Path() As String
Dim obj_ws_shell As Object
Set obj_ws_shell = CreateObject("WScript.Shell")
Get_Desktop_Path = obj_ws_shell.SpecialFolders("Desktop")
End Function
Sub Main()
MsgBox Get_Desktop_Path
End Sub
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.