Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jenner
 
Posts: n/a
Default Incrementing by 1 when doc is opened

I am trying to increment a number by one every time the document is opened -
will I need to make a macro? I am new with macros and know not much about
them. Please can someone help - the original document is in word, but I'm
not sure if you can increment in word - it would be good if I could though -
I would rather use word then excel but if can't be done, excel will have to
do.

Thanks

Jenner
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default Incrementing by 1 when doc is opened

I believe you will have to use a macro like this...

Private Sub Workbook_Open()
Range("A1").Formula = Range("A1").Value + 1
ActiveWorkbook.Save
End Sub

Insert this code under "ThisWorkbook". You will need to change the A1 to
the desired cell you want incremented. The "ActiveWorkbook.Save" may not be
necessary, depending on what you want. If someone opened the file and didn't
save, it would not record the change without that command.

"Jenner" wrote:

I am trying to increment a number by one every time the document is opened -
will I need to make a macro? I am new with macros and know not much about
them. Please can someone help - the original document is in word, but I'm
not sure if you can increment in word - it would be good if I could though -
I would rather use word then excel but if can't be done, excel will have to
do.

Thanks

Jenner

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jenner
 
Posts: n/a
Default Incrementing by 1 when doc is opened

Thanks for your help - I will try that.

"Sloth" wrote:

I believe you will have to use a macro like this...

Private Sub Workbook_Open()
Range("A1").Formula = Range("A1").Value + 1
ActiveWorkbook.Save
End Sub

Insert this code under "ThisWorkbook". You will need to change the A1 to
the desired cell you want incremented. The "ActiveWorkbook.Save" may not be
necessary, depending on what you want. If someone opened the file and didn't
save, it would not record the change without that command.

"Jenner" wrote:

I am trying to increment a number by one every time the document is opened -
will I need to make a macro? I am new with macros and know not much about
them. Please can someone help - the original document is in word, but I'm
not sure if you can increment in word - it would be good if I could though -
I would rather use word then excel but if can't be done, excel will have to
do.

Thanks

Jenner

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jenner
 
Posts: n/a
Default Incrementing by 1 when doc is opened

Hi,

Do you know if you can increment in word? Do I put the same macro in as
below?

thanks

Jenner

"Sloth" wrote:

I believe you will have to use a macro like this...

Private Sub Workbook_Open()
Range("A1").Formula = Range("A1").Value + 1
ActiveWorkbook.Save
End Sub

Insert this code under "ThisWorkbook". You will need to change the A1 to
the desired cell you want incremented. The "ActiveWorkbook.Save" may not be
necessary, depending on what you want. If someone opened the file and didn't
save, it would not record the change without that command.

"Jenner" wrote:

I am trying to increment a number by one every time the document is opened -
will I need to make a macro? I am new with macros and know not much about
them. Please can someone help - the original document is in word, but I'm
not sure if you can increment in word - it would be good if I could though -
I would rather use word then excel but if can't be done, excel will have to
do.

Thanks

Jenner

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 do I find an Excel spreadsheet opened as attachment in Outlook Irv K. Excel Discussion (Misc queries) 1 November 28th 05 06:24 PM
file opened twice on network stevenmorrison Excel Discussion (Misc queries) 1 October 25th 05 03:44 PM
pane freezes when file is opened andy b Excel Discussion (Misc queries) 3 July 4th 05 02:28 PM
Link Soucre changes when Spreadsheet opened from with within Outlook Cy Eze Links and Linking in Excel 0 January 6th 05 04:43 PM
can't save newly opened files Rasoul Khoshravan Excel Discussion (Misc queries) 1 December 9th 04 07:27 AM


All times are GMT +1. The time now is 11:54 AM.

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

About Us

"It's about Microsoft Excel"