Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
TKM TKM is offline
external usenet poster
 
Posts: 33
Default Automate Menu item with VBA?

I have several reports that I export from Access to Excel which look
terrible. I was wondering if there is a simple way to auto format the columns
(align) by code via the menu item? Example the manual way. Select complete
workbook, format, columns, autoformat. can this be done via VBA?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Automate Menu item with VBA?

If you can do it manually, you can record the VBA code.

ToolsRecord New macro..make your changes. stop recording.
The generated code will probably not be the most efficient, but will show
you the requirements.

NickHK

"TKM" ...
I have several reports that I export from Access to Excel which look
terrible. I was wondering if there is a simple way to auto format the
columns
(align) by code via the menu item? Example the manual way. Select complete
workbook, format, columns, autoformat. can this be done via VBA?



  #3   Report Post  
Posted to microsoft.public.excel.programming
TKM TKM is offline
external usenet poster
 
Posts: 33
Default Automate Menu item with VBA?

Thank you it is a great start.. Do you know where I would put the code so
when I export an updated report from Access that this code runs and does what
I recorded?

Thanks again

"NickHK" wrote:

If you can do it manually, you can record the VBA code.

ToolsRecord New macro..make your changes. stop recording.
The generated code will probably not be the most efficient, but will show
you the requirements.

NickHK

"TKM" ...
I have several reports that I export from Access to Excel which look
terrible. I was wondering if there is a simple way to auto format the
columns
(align) by code via the menu item? Example the manual way. Select complete
workbook, format, columns, autoformat. can this be done via VBA?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Automate Menu item with VBA?

If you use the Record Macro option described by NickHK, you will see an
option on the "Record Macro" dialog box titled "Store macro in:"
Select "Personal Macro Workbook" and this macro will always be
available to you when you use Excel.

If you create/edit your macro in VBA, you'll want add a module to the
"VBAProject (PERSONAL.XLS)" project. (By the way, if you record a
macro, it will automatically create a new module in this project for
you)

When you close Excel, if you've added/changed macros to your Personal
Macro Workbook, you will be prompted whether you want to save the
changes you made to the Personal Macro Workbook. Click the "Yes"
button, otherwise your macros will be lost.

Good Luck,
Glenn Ray



TKM wrote:
Thank you it is a great start.. Do you know where I would put the code so
when I export an updated report from Access that this code runs and does what
I recorded?

Thanks again

"NickHK" wrote:

If you can do it manually, you can record the VBA code.

ToolsRecord New macro..make your changes. stop recording.
The generated code will probably not be the most efficient, but will show
you the requirements.

NickHK

"TKM" ...
I have several reports that I export from Access to Excel which look
terrible. I was wondering if there is a simple way to auto format the
columns
(align) by code via the menu item? Example the manual way. Select complete
workbook, format, columns, autoformat. can this be done via VBA?





  #5   Report Post  
Posted to microsoft.public.excel.programming
TKM TKM is offline
external usenet poster
 
Posts: 33
Default Automate Menu item with VBA?

Any ideas on how to keep the alignment from the recorded macro when a user
runs an updated report. Seems the report get overwritten and I have to start
from scratch? Any ideas on this? I am using an Access report and using the
output and or transferspread sheet acion in Access. Thanks again

"Glenn" wrote:

If you use the Record Macro option described by NickHK, you will see an
option on the "Record Macro" dialog box titled "Store macro in:"
Select "Personal Macro Workbook" and this macro will always be
available to you when you use Excel.

If you create/edit your macro in VBA, you'll want add a module to the
"VBAProject (PERSONAL.XLS)" project. (By the way, if you record a
macro, it will automatically create a new module in this project for
you)

When you close Excel, if you've added/changed macros to your Personal
Macro Workbook, you will be prompted whether you want to save the
changes you made to the Personal Macro Workbook. Click the "Yes"
button, otherwise your macros will be lost.

Good Luck,
Glenn Ray



TKM wrote:
Thank you it is a great start.. Do you know where I would put the code so
when I export an updated report from Access that this code runs and does what
I recorded?

Thanks again

"NickHK" wrote:

If you can do it manually, you can record the VBA code.

ToolsRecord New macro..make your changes. stop recording.
The generated code will probably not be the most efficient, but will show
you the requirements.

NickHK

"TKM" ...
I have several reports that I export from Access to Excel which look
terrible. I was wondering if there is a simple way to auto format the
columns
(align) by code via the menu item? Example the manual way. Select complete
workbook, format, columns, autoformat. can this be done via VBA?





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
Automate Pivot Table to only 1 Item Steve Excel Discussion (Misc queries) 0 September 25th 07 08:58 PM
Add menu item to right-click menu [email protected] Excel Programming 1 July 15th 06 10:32 AM
Adding Sub Menu Item to Current Custom Menu Renato Excel Programming 2 December 19th 05 12:48 AM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM


All times are GMT +1. The time now is 09:41 PM.

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"