User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 391,552 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,594 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 4605 | Replies: 3
Reply
Join Date: May 2006
Posts: 39
Reputation: INI is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
INI INI is offline Offline
Light Poster

Question Selection.End(xlDown).Select

  #1  
Jul 18th, 2006
Good Morning All,

I am having a major issue here; for some reason the line of code below works and sometimes does not work. When it desides not to work, it leaves a mess in my excel sheet.

Range("A1").Select ' This just goes to the upper left corner of the sheet
 
 Selection.End(xlDown).Select
' The line of code above is suppose to jump to the last empty row in column A1.


Please can someone tell me what the problem is? Or is there another code I can use to achieve the same goal?

Ini
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Selection.End(xlDown).Select

  #2  
Jul 18th, 2006
try doing a msgbox on your xlDown variable, and make sure it has the right value... what happens to the sheet when it messes up?
Reply With Quote  
Join Date: May 2006
Posts: 39
Reputation: INI is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
INI INI is offline Offline
Light Poster

Re: Selection.End(xlDown).Select

  #3  
Jul 19th, 2006
What happens is that sometimes when I use the code for it to jump to the last blank row, it would jump and that's fine. But on some cases it would not jump instead it would select A1 as the last row and would start over writing my data's in A3, A4 and so on.
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Selection.End(xlDown).Select

  #4  
Jul 19th, 2006
Hmn, can you post the entire project?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 9:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC