Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Code: -------------------- Public Sub HotTPassword() Dim irow As Long Dim mydate As Date Dim mytime Dim mycell mydate = Date mytime = Time Application.ScreenUpdating = False If Range("B4").Value = "" Then Range("B$").Select Else Range("B" & Row.Count).End(xlUp).Offset(1, 0).Select ' problem line???? End If mycell = ActiveWorkbook.ActiveCell If mycell < "" Then ActiveCell.Value = mydate 'Column B ActiveCell.Offset(0, 1).Value = mytime 'Column C ActiveCell.Offset(0, 3).Value = "User" 'Column F ActiveCell.Offset(0, 6).Value = "Password" 'Column L ActiveCell.Offset(0, 1).Value = "Credit Apps" 'Column M ActiveCell.Offset(0, 1).Value = "Password Expired, need to be reset" 'Column N ActiveCell.Offset(0, 4).Value = "Verified Closed" 'Column R ActiveCell.Offset(0, 1).Value = "Medium" 'Column S ActiveCell.Offset(0, 1).Value = "IT Support" 'Column T ActiveCell.Offset(0, 2).Value = "Password Reset and Informed user." 'Column V ActiveCell.Offset(0, 1).Value = "IT Support" 'Column W ActiveCell.Offset(0, 1).Value = mydate 'Column X ActiveCell.Offset(0, 1).Value = mytime 'Column Y Application.ScreenUpdating = True End If End Sub -------------------- -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=545014 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think you are being somewhat disingenuous to post code that you say you
have fully tested and expect us to work out what it is supposed to do, what it is doing, and how to correct it. Do more yourself or expect little. This is rubbish though If Range("B4").Value = "" Then Range("B$").Select Else Range("B" & Row.Count).End(xlUp).Offset(1, 0).Select ' problem line???? End If "B$" is not a proper range address, and it should be Rows.Count. -- HTH Bob Phillips (remove xxx from email address if mailing direct) "harpscardiff" wrote in message news:harpscardiff.28b5cn_1148467201.8194@excelforu m-nospam.com... Code: -------------------- Public Sub HotTPassword() Dim irow As Long Dim mydate As Date Dim mytime Dim mycell mydate = Date mytime = Time Application.ScreenUpdating = False If Range("B4").Value = "" Then Range("B$").Select Else Range("B" & Row.Count).End(xlUp).Offset(1, 0).Select ' problem line???? End If mycell = ActiveWorkbook.ActiveCell If mycell < "" Then ActiveCell.Value = mydate 'Column B ActiveCell.Offset(0, 1).Value = mytime 'Column C ActiveCell.Offset(0, 3).Value = "User" 'Column F ActiveCell.Offset(0, 6).Value = "Password" 'Column L ActiveCell.Offset(0, 1).Value = "Credit Apps" 'Column M ActiveCell.Offset(0, 1).Value = "Password Expired, need to be reset" 'Column N ActiveCell.Offset(0, 4).Value = "Verified Closed" 'Column R ActiveCell.Offset(0, 1).Value = "Medium" 'Column S ActiveCell.Offset(0, 1).Value = "IT Support" 'Column T ActiveCell.Offset(0, 2).Value = "Password Reset and Informed user." 'Column V ActiveCell.Offset(0, 1).Value = "IT Support" 'Column W ActiveCell.Offset(0, 1).Value = mydate 'Column X ActiveCell.Offset(0, 1).Value = mytime 'Column Y Application.ScreenUpdating = True End If End Sub -------------------- -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=545014 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, Did you mean to reference B$ to lines above the problem line... can vb output the row number for a reference like that? Regards, -- pianoman ------------------------------------------------------------------------ pianoman's Profile: http://www.excelforum.com/member.php...o&userid=33712 View this thread: http://www.excelforum.com/showthread...hreadid=545014 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I've written a few little macros, and bascially i've taken bits from different macros i've dont or got help. So i don't really know why that is there, i suppose its to select column? not sure - does the rest make sense? -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=545014 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I do apologies for not giving you more detail - i just wanted that one line rectified no the whole thing!! I'm a novice at VBA and just struggling my way through it. I've sorted out my code, and it works, just to sort out the offsets. BTW - Bob Phillips - your attitude fcking stinks!! Sort your self man!! ![]() Piano Man Cheers for the input. -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=545014 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
while the medicine may not have been pleasant, Bob magnanimously gave you the
help you needed. If you had simply said, I can't see the problem, but seem to be having trouble with this line - I doubt you would have received anything but the help you needed - so you invited criticism by your own implication that you were too lazy to do your own debugging rather than simply saying you lacked the knowledge to fix it. -- Regards, Tom Ogilvy "harpscardiff" wrote: I do apologies for not giving you more detail - i just wanted that one line rectified no the whole thing!! I'm a novice at VBA and just struggling my way through it. I've sorted out my code, and it works, just to sort out the offsets. BTW - Bob Phillips - your attitude fcking stinks!! Sort your self man!! ![]() Piano Man Cheers for the input. -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=545014 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Whats wrong with this code? | Excel Programming | |||
Whats wrong with this code? | Excel Programming | |||
Whats wrong with this line of code? | Excel Programming | |||
whats wrong with this code | Excel Programming | |||
Whats wrong with this code | Excel Programming |