LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-09-2006, 03:12 PM   #1
oblivious69
Member
 
Registered: May 2005
Distribution: debian
Posts: 79

Rep: Reputation: 15
Excel and VBA programming question


I need to write a quick dirty excel sheet with some vba to load some data...but I keep getting an error. Here is what I've done

------
Dim locType As String
.
.
.
Set locType = Worksheets("whateverwkst").Cells(locrow, loccol + 1).Value
------

When I run it, I get an error with "locType =" highlighted saying compile error: object required. What am I missing?
 
Old 01-09-2006, 04:13 PM   #2
zikhermm
Member
 
Registered: Jul 2001
Location: New York City
Distribution: Suse, Debian, Slack
Posts: 49

Rep: Reputation: 15
you're getting the error because by using 'set' its expecting an object.

what you have is correct, just take out the 'set' keyword. Also maybe you want cells(row,col).text, rather than cells(row,col).value?

your call though
 
Old 01-10-2006, 10:22 AM   #3
oblivious69
Member
 
Registered: May 2005
Distribution: debian
Posts: 79

Original Poster
Rep: Reputation: 15
that was it, thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Polymorphism in VBA ashirazi Programming 4 07-05-2005 04:44 PM
ZSNES and VBA -- no sound Shafted Linux - Software 1 03-24-2005 01:05 PM
Error compiling VBA "Cannot find libPng" dustin_wielenga Linux - General 1 03-06-2005 02:39 AM
Programming question pk21 Linux - Newbie 6 12-02-2002 01:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration