Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default fill A1 when open xsl file

Please how to write macro, which fill cell A1 with text "Hello" whe
open the xsl file

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default fill A1 when open xsl file

use the workbook_Open event. See Chip Pearson's page on events
http://www.cpearson.com/excel/events.htm

Private Sub Workbook_Open()
with Worksheets("Sheet1")
.Range("A1").Value = "Hello"
End With
End Sub

Place this in the thisworkbook module.
--
Regards,
Tom Ogilvy


"tpapaj " wrote in message
...
Please how to write macro, which fill cell A1 with text "Hello" when
open the xsl file?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default fill A1 when open xsl file

i'm sorry, but your sample doesnt wor

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default fill A1 when open xsl file

Do you have a Sheet1 in the workbook you are opening?
If not change Tom's code reference to Sheet1 to YourSheetName.

"tpapaj " wrote in message
...
i'm sorry, but your sample doesnt work


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default fill A1 when open xsl file

Hi
what error did you get or does nothing happen?.
Check if you have places Tom's code into the workbook module (and not
into a standard module)

--
Regards
Frank Kabel
Frankfurt, Germany


i'm sorry, but your sample doesnt work


---
Message posted from http://www.ExcelForum.com/




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default fill A1 when open xsl file

i'm sorry, it works i didn't paste code into "this sheet

--
Message posted from http://www.ExcelForum.com

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
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
Open email windows can't open, excel shreadsheet file .xls ? skiz Excel Discussion (Misc queries) 0 October 2nd 05 07:03 PM


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