Thanks for the details . Let me give it a shot. I also have a sample code !
Dim WBName, FilePath As String
WBName = ActiveWorkbook.Name
FilePath = CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\" & WBName & ".pdf"
Sheets.Select...
Can you please let me know the syntax? Is it through docmd transfer or how? Thanks for the help ! Assume my Excel report is in this location- (CurrentProject.Path & "\Book1.xlsx")
Thanks. Let me ask my question better- I have Book1.xlsx in C Drive. I am able to open Book1.xlsx and save it as Book1.pdf manually and the format and contents are preserved in the pdf. Can I do the same by opening the Book1.xlsx and save it as Book1.pdf and close both Book1.xlsx and Book1.pdf...
[/code]
Set Wkb1 = xlApp.Workbooks.Open(CurrentProject.Path & "\Book1.xlsx")
Wkb1.Save // To save the Excel workbook after updating and writing contents.
[/code]
I use the above vba code snippet to save contents in an excel workbook and save it in my Current Folder.
Is there a way to save...
Could you please tell me how to change background color of MSAccess Reports using VBA? How can I do border coloring. What are the vba codes for all color options like light green, light blue etc.
How to change the font type to bold etc using vba
I did some changes to text box coloring in...
If a File exists in CurrentProject.Path & "\Book1.xlsx" , I want to delete it
and create a new file . How can I do it using MsAccess vba . Please help !
Also how to create a new Workbook Book1.xlsx with only one WorkSheet called Sheet1
Thanks
The below code works fine only for the first time and when I try to rerun, it is not copying the sheets from source to destination. If I close the MsAccess DB and then reopen and execute it works again. Looks like some initialization problem. Can some one help me
Dim x, i As Integer x = 1...
How to open a pre filled excel template in read and write mode from msaccess vba and insert data from msaccess tables
into specific columns in excel.
Rename the tabs in excel sheet based on a specific column in the access data.
Each row in the table will go to a seperate tab in excel.
Save the...
Hi, I am trying to run the below query. It fetches records when the select criteria is satisfied, however when no records are matched, I would like the query to display 0 .Please help!
select distinct(cars) from tbl1,tbl2 where tbl1.col1 =tbl2.col2 and tbl2.col2 is not null and tbl1.col3 not in...
Hi, I have a date/time column in msaccess 2007 table and it has values in mm/dd/yyyy format. I want to keep the mm and yyyy values as it is and only update the dd value to 01. Is there an easy update query to get it done.
I am tring to run a query like this
Update Table1 Set Day(ColumnName)...
Can I change Month(Now) in Msaccess to point to someother month without changing the system date in the taskbar date/time settings of my computer.
In otherwords,is there a way to change the date/time settings to affect only MsAccess DB without affecting other documents.
I am using the below...
How to select the rows based on last 13 dates from a table.
Suppose today is March 15,2012 and if the table has data between
March 2012 to Jan 2000,my query should pick up data between
March 2012 to March 2011. (13 months)
Similarly, if table has data from Feb 2012 to Jan 2000 and the...
I have 5 subreports subreport1 to subreport5 in the main report's
report header section.
How to display page header of subreport3 in the main report. Please help !
thanks
User enters data in a form (Form1) ,textBox1 and clicks save button and closes the form.
The user then opens Report1,while opening the report, the report should show the form's text box content in the reports textbox. Is that possible.
In MsAccess 2007,I want each row color to change based on a column value in the report.
For example: Select Name,Age,Salary from table 1 -creates 3 rows.
Name Age Salary
A 15 1000
B 25 2000
C 35 3000
if Salary column is less than...