Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Auto Open and Passing variable value(s) to MS Word

Hi,
I want to ask regarding the previous post regarding the Auto Open
method, I have put this simple code :
Sub Workbook_Open()
MsgBox("Auto Open Macro Success")
End Sub

and it still showing up the Enable Macro screen. What's wrong ?.

Secondly, How do you pass a variable value from a MS Excel worksheet
to a MS Word document ?.

Lastly, tons of thanks.

rgds
sony
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Auto Open and Passing variable value(s) to MS Word

Sony,

Sub Workbook_Open()

It should be "Private Sub Workbook_Open" and it
should be in the "ThisWorkbook" module. I suspect that
you have it in a regular module (and it won't work from there).

and it still showing up the Enable Macro screen.

If you have any code in a workbook and your security setting
is set to "Medium", you'll get this alert every time. Other than
using a digital signature (which is a chore in itself, and expensive)
or setting your security setting to "Low" there isn't any way around this.

John




"Sony" wrote in message
...
Hi,
I want to ask regarding the previous post regarding the Auto Open
method, I have put this simple code :
Sub Workbook_Open()
MsgBox("Auto Open Macro Success")
End Sub

and it still showing up the Enable Macro screen. What's wrong ?.

Secondly, How do you pass a variable value from a MS Excel worksheet
to a MS Word document ?.

Lastly, tons of thanks.

rgds
sony



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
Passing Variable to LINEST RW Excel Worksheet Functions 5 May 24th 05 07:00 PM
Passing a variable to a Worksheet at open time Neil Excel Programming 0 September 18th 03 03:52 PM
passing a variable as an argument to a function Drew[_6_] Excel Programming 3 July 25th 03 08:51 PM
Passing a variable to a range statement Mervyn Thomas[_3_] Excel Programming 3 July 25th 03 02:40 PM
Passing a value to a variable from Userform Neal Steiner Excel Programming 1 July 18th 03 09:12 PM


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