Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2017, 02:22 AM
mihnea96 mihnea96 is offline Writing VBA code in Excel from VBA Word Windows 7 32bit Writing VBA code in Excel from VBA Word Office 2010 32bit
Novice
Writing VBA code in Excel from VBA Word
 
Join Date: Apr 2017
Posts: 26
mihnea96 is on a distinguished road
Default Writing VBA code in Excel from VBA Word

Hi,
I'm trying to write some code in VBA Excel from VBA Word and i've tried using the code bellow, but i guess that's not how it's supposed to be done as it doesn't work. Could you kindly help me out, please?


Sub WriteToExcel()
Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")
With objExcel


.Visible = True
.Workbooks.Add
.VBProject.vbComponents.Add (vbModule)
End With
End Sub
Reply With Quote
Reply

Tags
vba excel, word vba macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing VBA code in Excel from VBA Word Looping through word and writing to excel when certain conditions are met Irene H Word VBA 2 07-10-2016 05:59 PM
Writing VBA code in Excel from VBA Word Writing a VBA code for printing multiple sheets in a workbook m85miller Excel Programming 1 02-02-2016 01:41 AM
Require assistance in writing code to login to webmail account. saurabhlotankar Excel Programming 4 05-21-2015 10:47 AM
Help Writing VBA Code using the HideMark property bgranzow Word VBA 7 06-02-2014 04:10 PM
Writing code with C# and VB.NET to create Outlook add-ins and other projects kistou Outlook 0 01-13-2010 04:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft