Microsoft Corp CEO Steve Ballmer said he sees opportunities to work with Yahoo Inc to create a better search product but would not comment on discussions that the two may be engaged in.

Ballmer's trip to the San Francisco Bay area has prompted speculation he might be meeting with Yahoo CEO Carol Bartz about a potential deal.

Ballmer, asked about Microsoft's unsuccessful bid to buy Yahoo last year, said he still thought a tie-up would have been valuable. He was speaking to students at Stanford University on Wednesday.

I'm glad we went down the road, Ballmer said. He reiterated previous comments about the potential opportunities of a search partnership with Yahoo, which could bring in more customers and advertisers.

Ballmer also told the audience that the economy is in a multiyear phase of resetting to a lower level.

Yahoo and Microsoft are the No. 2 and No. 3 search engines in the United States with roughly 8 percent market share and 21 percent market share, respectively, in March, according to comScore.

Google Inc, the No. 1 Internet search engine, had nearly 64 percent of the market in March.

(Reporting by Alexei Oreskovic; Editing by Gary Hill)