473,395 Members | 1,742 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,395 software developers and data experts.

Hiding field names

Can anyone help me?

Please see the code I'm using now.

Public Function sheetlayout()
On Error GoTo Err_Command1_Click
Dim xl As Object
Set xl = GetObject("c:\windows\desktop\123.csv")
xl.Application.Visible = True
xl.Parent.windows(1).Visible = True
xl.sheets("excellist").Select
xl.sheets("excellist").Rows("1:1").Select
xl.Application.selection.Delete = True
xl.Application.Save
xl.Application.Quit

Set xl = Nothing
Exit Function

Err_Command1_Click:
MsgBox Err.Description
Resume Next

Exit Function
End Function
However, after "xl.Application.selection.Delete = True" I'm getting a
message "Unable to set the delete property of the range class"
After "Resume Next" a new file is created on the Desktop with the name
Resume.
What am I doing wrong?
Please help!!
Thanks
=======================

M.***********@uva.nl (Marc) wrote in message news:<ae**************************@posting.google. com>...
my*****@hotmail.com (Jacky11) wrote in message news:<46**************************@posting.google. com>...
Subject: Hiding field names.
I'm exporting a query with a lot of strings to Excel.
When exporting - is there any way to have the field name hidden or
removed from the query by default?
I don't need the field name as a heading on the excel sheet.

=============

Jacky,
4. You could create a menu-item or commandbutton on a form to start a
macro and/or VBA-procedure like in my example.

success, Marc

example based on one of my own applications:
I had a query to export to a spreadsheet and to do a little layouting
from access.
To hide the column-names you could add:
xl.application.selection.hidden = true

Nov 12 '05 #1
1 2847
Delete is not a property it is a method. Try this:

xl.sheets("excellist").Rows("1:1").Select
xl.Application.selection.Delete

Or this:

xl.sheets("excellist").Rows("1:1").Delete

HTH

Rick Collard
www.msc-lims.com
On 15 Sep 2003 13:50:52 -0700, my*****@hotmail.com (Jacky11) wrote:
Can anyone help me?

Please see the code I'm using now.

Public Function sheetlayout()
On Error GoTo Err_Command1_Click
Dim xl As Object
Set xl = GetObject("c:\windows\desktop\123.csv")
xl.Application.Visible = True
xl.Parent.windows(1).Visible = True
xl.sheets("excellist").Select
xl.sheets("excellist").Rows("1:1").Select
xl.Application.selection.Delete = True
xl.Application.Save
xl.Application.Quit

Set xl = Nothing
Exit Function

Err_Command1_Click:
MsgBox Err.Description
Resume Next

Exit Function
End Function
However, after "xl.Application.selection.Delete = True" I'm getting a
message "Unable to set the delete property of the range class"
After "Resume Next" a new file is created on the Desktop with the name
Resume.
What am I doing wrong?
Please help!!
Thanks
=======================

M.***********@uva.nl (Marc) wrote in message news:<ae**************************@posting.google. com>...
my*****@hotmail.com (Jacky11) wrote in message news:<46**************************@posting.google. com>...

Subject: Hiding field names.
I'm exporting a query with a lot of strings to Excel.
When exporting - is there any way to have the field name hidden or
>removed from the query by default?
>I don't need the field name as a heading on the excel sheet.

=============

Jacky,
4. You could create a menu-item or commandbutton on a form to start a
macro and/or VBA-procedure like in my example.

success, Marc

example based on one of my own applications:
I had a query to export to a spreadsheet and to do a little layouting
from access.
To hide the column-names you could add:
xl.application.selection.hidden = true


Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Alex Hunsley | last post by:
There's no really specific questions in this post, but I'm looking for people's thought on the issues within... The two main versions I've encountered for data pseudo-hiding (encapsulation) in...
3
by: Frank K. | last post by:
Hello, Hoping someone can help me out. When I select all records in a table, copy them to the clip board, and paste them to Excel the names of the fields appear in the first row in Excel....
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
1
by: Fix_Metal | last post by:
Hello all. I'm new to this group :) I have a problem with javascript language. I'm making an .asp page with some integrated Javascript functions. The page consists of some HTML selects and a...
12
by: Ste | last post by:
Hi there, I've got a website with a list of Frequently Asked Questions, so there's a question and answer in a long list down the page. Can anyone recommend a simple script that would allow me...
2
by: developer.new | last post by:
Hi I have a question regarding this concept I learned about recently: Name Hiding. Here's what I've come across: There is a base class with two functions with the same name but different...
11
by: JJ297 | last post by:
I want to hide the Pin field below in my repeater. How do I do this? <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"> <ItemTemplate> <tr> <td><font...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.