Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Position to first empty cell upon program open

I have a workbook for data entry which contains many rows of data. I want my
cursor/selection to automatically position to the first applicable empty row
in Column A when I open this workbook. It currently positions to A81. Is
this the default, or can I change it? Is there a way to do this?
--
Savannah
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Position to first empty cell upon program open

Include the following macro in the worksheet event code area:

Private Sub Worksheet_Activate()
n = Cells(Rows.Count, "A").End(xlUp).Row
Cells(n, "A").Select
End Sub


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200810


"Savannah" wrote:

I have a workbook for data entry which contains many rows of data. I want my
cursor/selection to automatically position to the first applicable empty row
in Column A when I open this workbook. It currently positions to A81. Is
this the default, or can I change it? Is there a way to do this?
--
Savannah

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Position to first empty cell upon program open

I tried that, but I am not able to edit the macro... I get an error message
that says, "Project locked--project unavailable".

--
Savannah


"Gary''s Student" wrote:

Include the following macro in the worksheet event code area:

Private Sub Worksheet_Activate()
n = Cells(Rows.Count, "A").End(xlUp).Row
Cells(n, "A").Select
End Sub


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200810


"Savannah" wrote:

I have a workbook for data entry which contains many rows of data. I want my
cursor/selection to automatically position to the first applicable empty row
in Column A when I open this workbook. It currently positions to A81. Is
this the default, or can I change it? Is there a way to do this?
--
Savannah

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Position to first empty cell upon program open

This will occur if your workbook is shared under ToolsShare Workbook.

Unshare to add the code.

Re-share after if necessary. The code will run.


Gord Dibben MS Excel MVP

On Mon, 27 Oct 2008 07:56:02 -0700, Savannah
wrote:

I tried that, but I am not able to edit the macro... I get an error message
that says, "Project locked--project unavailable".


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Position to first empty cell upon program open

Thank you for your help. I unshared the workbook and added the code, but now
I get an security warning every time I open the workbook saying that the
macro has been disabled because it may contain a virus. I chose "Enable
content", but the message keeps coming up.
--
Savannah


"Gord Dibben" wrote:

This will occur if your workbook is shared under ToolsShare Workbook.

Unshare to add the code.

Re-share after if necessary. The code will run.


Gord Dibben MS Excel MVP

On Mon, 27 Oct 2008 07:56:02 -0700, Savannah
wrote:

I tried that, but I am not able to edit the macro... I get an error message
that says, "Project locked--project unavailable".





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Position to first empty cell upon program open

If your macro security is set to medium you will get the message about
disabling or enabling macros.

When you open the workbook click on "Enable Macros" to have the code run.

If you don't want to see the message you can set security to "low".......not
recommended...............or create a digital signature using MS Office
Tools SelfCert application.


Gord

On Mon, 27 Oct 2008 10:12:12 -0700, Savannah
wrote:

Thank you for your help. I unshared the workbook and added the code, but now
I get an security warning every time I open the workbook saying that the
macro has been disabled because it may contain a virus. I chose "Enable
content", but the message keeps coming up.


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
How can I program excel to shift data up to fill empty cells? Howlingstraycat Excel Discussion (Misc queries) 1 December 22nd 07 11:58 PM
Default cell position on file open Chandramouly Excel Discussion (Misc queries) 2 March 9th 07 07:32 PM
I cant open files unless I open the Excel program first ElaineAng Excel Discussion (Misc queries) 3 February 16th 06 02:54 PM
Open another program sing VBA Rob Excel Discussion (Misc queries) 10 March 29th 05 11:09 AM
can't open 2 excel program a once tim Excel Worksheet Functions 2 February 22nd 05 02:49 AM


All times are GMT +1. The time now is 07:16 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"