473,387 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

VBA and command button in Excel

In Excel I have a command button that I want to reference a PDF document and have no idea how to do this. Below is code that I did to do a button with a word doc. Can someone please help me out?
Thanks

Private Sub CommandButton12_Click()
Dim wdDoc As Object
Set wdDoc = GetObject("\\Husw2fs01\SharedHUS\H2-3 MSO Docs\Report Template\Day shift report_v2.doc")
wdDoc.Parent.Visible = True
Application.ActivateMicrosoftApp xlMicrosoftWord
Mar 24 '08 #1
0 743

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mr. Bungle | last post by:
When importing excel from access I am fully aware that one can import directly into a table. Can you get as specific via code or something to import data from an excel sheet to a FORM (Not Table)...
2
by: Senthil | last post by:
Hi All I need to create an Excel report and create a command button and have to run a macro on the click event that will print all the pages in the Excel workbook. I am able to create the report...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
0
by: wankhusairi | last post by:
hello for your imformation im using Vb6 and having difficulties on loading a file and then displayed the file. for your information i uses a combox,listview ,directory view and also command buttons...
1
by: crystalgal | last post by:
Help. I am using Excel to enter in daily numbers in worksheet 2. I want to use vb (w/in excel) to create a command button in worksheet 1. I want to enter a date in a cell and click the command...
4
by: Wernerh | last post by:
I have a command button in my application that writes to Excel for report purposes. It has many text boxes in VB app that it populates the Excel spreadsheet with. The problem is that VB gives an...
2
by: zillou32 | last post by:
Hi guy, my question is as follows, am currently working on an excel sheet and need to add a vb command button. the action of this button is to to sent the sheet by mail (outlook). the command...
2
rsmccli
by: rsmccli | last post by:
Hello. Using Access 2002. I have set up a command button on a form that will print off a list of hyperlinked documents that resides in one of our tables. I have been using code borrowed from Graham R...
4
by: mld01s | last post by:
Hi all!! I need help, I have been stuck for a few days on this one. I am trying to open an excel table from a command button in Access. The excel table has an auto_open macro, that is supposed to...
1
MitchR
by: MitchR | last post by:
Good Morning Folks; I have a question that is pretty far fetched but here goes nothing... I am looking to find a way to insert a macro into an Excel command button located in an Access VBA...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.