Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Haven't fully tested my code - whats wrong with it????


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Haven't fully tested my code - whats wrong with it????

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Haven't fully tested my code - whats wrong with it????


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Haven't fully tested my code - whats wrong with it????


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Haven't fully tested my code - whats wrong with it????


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Haven't fully tested my code - whats wrong with it????

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Whats wrong with this code? Steve[_73_] Excel Programming 2 January 31st 06 04:13 PM
Whats wrong with this code? Joseph[_54_] Excel Programming 2 November 26th 04 04:31 PM
Whats wrong with this line of code? Edgar Thoemmes[_4_] Excel Programming 4 October 26th 04 12:52 PM
whats wrong with this code LiSa Excel Programming 2 September 8th 04 05:47 PM
Whats wrong with this code gav meredith Excel Programming 5 April 21st 04 12:01 AM


All times are GMT +1. The time now is 06:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"