View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Sub that will not end

Also how can I get this to start at the end of another comand that is started
with ctrl + g. ?


If that command is in the form of a sub and is in the standard module then
put this sub name just before End Sub like the example below:
Sub CtrlG()
'Do stuff
AutoFillIn
End Sub

"RebekahK20_pontiac via OfficeKB.com" wrote:

I have a Sub that will not end? Any ideas...




Function UserNameWindows() As String
UserNameWindows = Environ("USERNAME")
End Function



Sub AutoFillIn()
Dim c As Range
Do Until ActiveCell = ""


For Each c In Range("A8", "A1000")

ActiveCell.Offset(0, 8) = "=UserNameWindows()"

If "USERNAME" = "dadunlap,slhull,mdringler,sljackson,ccparker,
thenry,rdowling,jslong,mhjames,lndavis,jdscott,jfu llem,alwrinch" Then
ActiveCell.Offset(0, 6) = "YES"
Else: ActiveCell.Offset(0, 6) = "NO"
End If

ActiveCell.Offset(1, 0).Select

Next c
Loop
End Sub


Also how can I get this to start at the end of another comand that is started
with ctrl + g. ?

TIA

Rebekah

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200708/1